Variable Questions

Here is my code:

[xml]$a = get-content c:\file.xml

Using the above code, I can now select specific parts of that xml file. Â I do this as follows:


That gives me a list of everything from the name tag.

Now I can do this


Obviously that gives me everything in the date tag.

I need to combine these together so that I can pipe them to out-gridview using the -multi parameter. Â When the end user clicks on a row in out-gridview, I’m going to need to do something with just part of that selection. Â So for example, out-gridview would open and show a Name column and a Date column. Â The end user would click on a row and then click on OK. Â When they click OK, I need to take $ for the row they selected and for now just output it to the console with write-host.

I’m stuck on how to do this.

Looks like I had to walk away from the computer and come back to it. Â So for anyone else that might be having an encounter with the brain lapse, here is the code.

[xml]=$a get-content c:\file.xml

$ | select name,date