xml and powershell

I wrote about the unix command-line utility xmllint there : extract xml from the command line

Let’s do the same exercice in Powershell

PS> gc foo.xml


John


Jack


Simply use [xml] datatype !
(([xml](GC foo.xml)).emplist.emp|Where{$_.no-eq"1"}).ename
John

Powershell rules!

1 Comment

Leave a Reply

Your email address will not be published.