Trimbo

I thought of a new phrase today: "Democratic Futilism"You know how guys on the internet write 1,000 word essays in response to some bozo/troll on a mailing list who posts there is no global warming, or that Linux sucks, or whatever? Those people have been captured by Democratic Futilism.Democratic Futilism...

Did you know a Boeing 707 can do a barrel roll?Check out:http://www.aviationexplorer.com/707_roll_video.htm

Behold! XML parsing from the last post is now doing sub-expressions, type conversions and formatting all in one line.$nav.Select("/Season/Games/Game") | select-object -first 5 | Format-Table -property @{Label="Date";Expression={[DateTime]::Parse($_.SelectSingleNode("Date").Value).ToShortDateString()};Width=10},@{Label="AwayTeam";Expression={$_.SelectSingleNode("AwayTeam/Name").Value};Width=15},@{Label="AwayScore";Expression={$_.SelectSingleNode("AwayScore").Value};Width=10},@{Label="HomeTeam";Expression={$_.SelectSingleNode("HomeTeam/Name").Value};Width=15},@{Label="HomeScore";Expression={$_.SelectSingleNode("HomeScore").Value};Width=10},@{Label="Winner";Expression={if([Int32]::Parse($_.SelectSingleNode("AwayScore").Value) -gt [Int32]::Parse($_.SelectSingleNode("HomeScore").Value)) { $_.SelectSingleNode("AwayTeam/Name").Value } else { $_.SelectSingleNode("HomeTeam/Name").Value }};Width=15}Date AwayTeam AwayScore HomeTeam HomeScore Winner---- -------- --------- -------- --------- ------11/7/2006 Vermont 82 New Orleans...

PS C:\Users\Chris> $xdoc = new-object -typename System.Xml.XPath.XPathDocument -ArgumentList C:\Users\Chris\Documents\basketball.xmlPS C:\Users\Chris> $nav = $xdoc.CreateNavigator()PS C:\Users\Chris> $nav.Select("/Season/Games/Game/AwayTeam/Name") Format-Table -property ValueValue-----VermontHamptonHamptonYoungstown St.BrownVermontBrownChicago St.Youngstown St.Alcorn St.Alabama A&MSouth Dakota St.PennsylvaniaLoyola ChicagoArmyUABDavidsonLoyola MDMonmouthEastern IllinoisAlcorn St.MontreatMount St. Mary'sGeorge WashingtonDefianceNew HampshireWoffordAmericanStony BrookHowardAsburyLafayette