I think you are looking for XElement.GetDefaultNamespace Method
What is the XDocument equivalent of XMLDocument.DocumentElement.NamespaceURI
-
17-07-2023 - |
Question
I am trying to use XDocument for its linq methods.
I have seen doc.Root.GetNamespaceOfPrefix( "i" )
where doc is the XDocument and "i" is the namespace, but, with XmlDocument, I don't have to know about "i".
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow