$xPathDoc = new-object -typename System.Xml.XPath.XPathDocument -ArgumentList "c:\programdata\gws\buildinfo.xml"
$nav = $xPathDoc.CreateNavigator()
$strXPath = "GWS/SETUP@version"
$result = $nav.GetAttribute($strXPath, "")
so, i am trying to grab the attribute of SETUP node which is part of the GWS node.
Is what i am attempting possible? i want to use a simple xpath statement to locate the attribute.
the only examples i can find so far have been using the
$nav.Select("GWS/SETUP") then $nav.GetAttribute("version")
I Hear, I Forget
I See, I Remember
I Do, I Understand
Ronald McDonald
$nav = $xPathDoc.CreateNavigator()
$strXPath = "GWS/SETUP@version"
$result = $nav.GetAttribute($strXPath, "")
so, i am trying to grab the attribute of SETUP node which is part of the GWS node.
Is what i am attempting possible? i want to use a simple xpath statement to locate the attribute.
the only examples i can find so far have been using the
$nav.Select("GWS/SETUP") then $nav.GetAttribute("version")
I Hear, I Forget
I See, I Remember
I Do, I Understand
Ronald McDonald