You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xml.apache.org by Bill Halchin <bh...@hotmail.com> on 2000/12/16 07:06:26 UTC

Please help with the Xerces C++ DOMParser class

Hello,

  I have the following XML "file":
<?xml version='1.0' encoding='ascii'?> <!DOCTYPE arbitrate [<!ELEMENT 
arbitrate (#PCDATA)>]> <arbitrate> 1234 </arbitrate>

I am putting it in a MemInputSource object and using the DOMParser
class to parse. If you notice I have an internal DTD. How do I
tell the DOMParser instance that I want my XML "doc/file" to be
validated??? I looked the DOMParser API and saw the
setValidationScheme method. This doesn't seem to cause validation
to be done.

  Another question: assumimg I get the above probelm solved, if the
DOMParser instance encounters a non-valid XML file will it
throw an XMLException or so other kind of exception?? Or to put it
another way, how do I know if validation failed?

Regards,
Bill


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com