Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Loading XML

From: JG <jgeissman@-----.--.--->
To: NULL
Date: 2/24/2009 9:03:00 PM
Thanks Anthony, Joe and Martin in alphabetical order,

I did some more research and see I'm using MSXML2::IXMLDOMDocument, not 
XML 6.  Turning off ProhibitDTD doesn't help with the !DOCTYPE.  It 
seems that  maybe because pDoc is a pointer to a pointer, (a) I can't 
look inside pDoc to see what the problem is, or maybe after throwing an 
exception on loadXML pDoc isn't in a fit state to examine, and (b) auto-
suggest doesn't work so I can't find out what the name of 
ParseError.Reason is.  So I'm back to simply removing the two trouble-
makers and giving up.  The !DOCTYPE probably doesn't work because it 
refers to a Fannie Mae DTD that's not on our system.  I wish I knew why 
the other one doesn't work, as it seems to in another place in the 
system that receives similar XML from a different service.  
Thanks again,
Jim G 

In article <uHWABmolJHA.1248@T...>, mahotrash@y... 
says...
> 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
>    }
> 
> 
> 


transparent
Print
Mail
Like It
Disclaimer
.

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 www.altova.com/list/index.html. 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.

.
.

transparent

transparent