Really.. I was joking, but the explanation was very nice... Thanks.
"Keith Hill [MVP]" <r_keith_hill@no.spam.thank.u.hotmail.com> wrote in message news:utbmHTeYHHA.4008@TK2MSFTNGP05.phx.gbl...
"Brandon Shell" <tshell.mask@mk.gmail.com> wrote in message news:OaBgXfdYHHA.3996@TK2MSFTNGP02.phx.gbl...
> You have that in english
:-)
$test.SelectNodes('//*') |
select @{n='element';e={$_}},
@{n='text'; e={$_.get_InnerXml()}} |
fl
First we use an XPath expression '//*' that will select every node. Pass that to the SelectNodes() method on the XmlDocument object. Now those nodes are passed down the pipeline. We want to pick off the node's element/tag name represented by $_ as well as the XML contained within that element. We get that info with $_.get_InnerXml(). The rest is just hashtable goo to get Select-Object to display these expressions with the column titles that I want.
--
Keith