I don’t want to hard-code the URI and then have to assign a prefix before I can use an XPath expression to select nodes from the XML document. Is it possible to retrieve this information programmaticaly?
Is this the only way to do it?
string uri = xml.SelectSingleNode("*").Attributes["xmlns"].Value?
The only good alternative I can suggest (assuming you want to select nodes specifically by name) is to use
local-name():