What is the XDocument equivalent of XMLDocument.DocumentElement.NamespaceURI

StackOverflow https://stackoverflow.com/questions/23529050

  •  17-07-2023
  •  | 
  •  

質問

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".

役に立ちましたか?

解決

I think you are looking for XElement.GetDefaultNamespace Method

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top