Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Problem Validating XML Document >Thread Next - Re: Problem Validating XML Document Re: Problem Validating XML DocumentTo: NULL Date: 1/14/2009 12:52:00 PM MartinL wrote:
> Dim atrNSNode As IXMLDOMAttribute
> Set atrNSNode = xmlDocument.createNode(NODE_ATTRIBUTE, "xmlns:xsi",
> "http://www.w3.org/2001/XMLSchema-instance")
The namespace for namespace declaration attributes (i.e. xmlns:prefix)
is http://www.w3.org/2000/xmlns/ so the last argument above should be
"http://www.w3.org/2000/xmlns/"
Try whether that solves it, I haven't looked at the other code in detail.
> Set elmBook = xmlDocument.createElement("b:Book")
If you want to create XML with namespaces with MSXML then I strongly
suggest to use createNode as that is the only namespace aware method
that MSXML provides. So change _all_ those createElement calls to e.g.
createNode(1, "b:book", "http://foo.com")
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
