RE: Get all namespace prefix from XmlDocument class

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hi John,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to enumerate all namespace
prefixes and URIs in an XmlDocument. If there is any misunderstanding,
please feel free to let me know.

As far as I know, there are no methods or properties in XmlDocument for us
to get all the namespaces in an Xml. However, here is an article using XSL
to search for all namespaces in an Xml.

http://www.xmleverywhere.com/wrox/2270/2270_05_02.htm

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

.



Relevant Pages

  • Re: I need to return dataset in XML format so Flash can read it properly.
    ... > have the webservice return it as a XML. ... What do you mean, "without the namespaces"? ... XmlDocument xml = new XmlDocument; ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: namespace?
    ... I think it's a bit funny that the new MS stuff, I forget the name maybe it was WCF?, was almost back to comma delimited and they talked about cutting down on the data being sent across the net in comparison to XML. ... Honestly I think if the standard for web service namespaces was ACME/employees/HR instead of http://www.ACME.com/employees/HR it would have made more sense to me as it doesn't carry the connotation that it's a web address. ... The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 1 business day is acceptable. ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: XmlSerializer: deserialize against xsd generated class
    ... If there are 5 namespaces in the XML do I need to add a namespace for each ... I did find a code snippet that removes the "empty" nodes ... public partial class Request_TypeMessageTypeFieldTag4000 { ...
    (microsoft.public.dotnet.xml)
  • Re: namespace?
    ... confusion of using URL's as namespace names. ... Honestly I think if the standard for web service namespaces ... It is an XML standard per the World Wide Web Consortium. ... reason for needing namespaces in XML is because the very nature of XML ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: namespace?
    ... just for web service use. ... It is an XML standard per the World Wide Web Consortium. ... reason for needing namespaces in XML is because the very nature of XML ... Microsoft MSDN Online Support Lead ...
    (microsoft.public.dotnet.framework.webservices)