Processing Xml with PowerShell

April 6th, 2009 / Development in a Blink

The first Script Club ran tonight. Good questions, discussion and challenges from the group. A question about PowerShell and Xml came up.

Here is a script processing inline Xml (could easily be changed to point to a file). It extracts the Name and Age. Multiplies the Age  by 2, doubles it. Finally it displays the results in tabular format and then as comma separated values.

PowerShell and Xml

image

Results from line 37 and 38

image

Comments are closed.