I have the following XML that is provided to me and I cannot change it:
<Parent>
<Settings Version="1234" xmlns="urn:schemas-stuff-com"/>
</Parent>
I am trying to retrieve the "Version" attribute value using XPath. It appears since the xmlns is defined without an alias it automatically assigns that xmlns to the Settings node. When I read this XML into an XMLDocument and view the namespaceURI value for the Settings node it is set to "urn:schemas-stuff-com".
I have tried:
//Parent/Settings/@Version - returns Null
//Parent/urn:schemas-stuff-com:Settings/@Version - invalid syntax