Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Loading XML >Thread Next - Re: Loading XML Re: Loading XMLTo: NULL Date: 2/24/2009 3:09:00 PM JG wrote: > I'm updating a C++ app from VS2003, using MSXML6. XML isn't one of my > primary languages, so I'm having trouble with what is probably a very > simple matter. > > I get XML replies from a web service that begin with <?xml ... ?> and > then <! DOCTYPE ... > before we get to the root. As long as those two > are present, it refuses to load. I can remove them from the string > easily enough and then it loads, but I can't believe there isn't some > parameter I could set that would cause them to be ignored. Is there? With MSXML 6 for security reasons DTDs are disabled so you need to enable them if you want to parse documents with DTDs (DOCTYPE). JScript pseudo code var doc = new ActiveXObject('Msxml2.DOMDocument.6.0'); doc.setProperty('ProhibitDTD', false); doc.async = false; if (doc.load('file.xml')) { // now use file here } else { // check doc.parseError.reason } -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
