I wrote about powershell [xml] yesterady : xml and powershell
Let’s see how to use XPATH expressions in Powershell
With the [xml] datatype, we create a navigator :
I have not been seduced by a Microsoft product since ages, but I must say I felt with love in this goody much more than in perl, cygwin, or whatever python, dos, java, vb…
It is simply great to use on the command line and can do my work.
1:0 for Microsoft
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
Simply use [xml] datatype !
I just wrote one of my first powershell script yesterday, it has a pretty nice syntax actually, and no need to download anything like cygwin or other unix-like shell to your PC.
PS> $stmt = "set hea off`n"
PS> $stmt += "select 'hello world' from dual;"
PS> $res = ($stmt | sqlplus -s scott/tiger)
Pretty cool 🙂