Altova Mailing List Archives

Re: XmlNamespaceManager

From: "Joe Fawcett" <joefawcett@-------.--->
Date: 9/30/2004 9:29:00 AM
"Joshua Frank" <jfrank.removeluncheonmeat@a...> wrote in message
> Hi All,
> Is it possible to get an XmlNamespaceManager from a document in such a
> way that the namespaces are already added.  If I have a document that
> begins:
> <Configurations xmlns=""
>                  xmlns:ns1="uri1"
>                  xmlns:ns2="uri2"
>                  xmlns:ns3="uri3">
> it seems a real pain to have to do this:
> Dim Configurations As New XmlDocument
> Configurations.Load(...)
> 'make a namespace manager
> Dim nm As New XmlNamespaceManager(Configurations.NameTable)
> nm.AddNamespace("ns1", "uri1")
> nm.AddNamespace("ns2", "uri2")
> nm.AddNamespace("ns3", "uri3")
> Since the namespaces are already in the xml, why isn't there a way to
> ask it to give you a namespace manager that already knows about the
> document's namespaces?  It's tedious to have to add this manually,
> especially when you don't have the values handy?  Please tell me there's
> a convenient way to do this.  Thanks in advance.
> Cheers,
> Josh
I don't know but when I saw the preview of the new version you could set it
to read all those namespaces in automatically. I don't know if this made it
to the beta/final version though.




These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.