Processing Xml with PowerShell

by Doug Finke on April 6, 2009

in PSMDTAG: PowerShell and Xml,PowerShell,Script Club,Xml

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

{ 0 comments… add one now }

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>