You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by Kosaraju Karuna-C9013Z <C9...@motorola.com> on 2007/02/02 19:10:03 UTC

Validation using DOM

Hi,
 
We have a requirement to verify XML file validation error and
well-formedness error using DOM Apis.
We have used SAX api setFeature to acheive the same. So wanted to know
whether DOMDocument::setStrictErrorChecking
<http://xml.apache.org/xerces-c/apiDocs/classDOMDocument.html#z61_11>
(bool strictErrorChecking)=0 also does the same?
If not, can you let me know the correct API. 
 
Thanks
Karuna
 

Re: Validation using DOM

Posted by David Bertoni <db...@apache.org>.
Kosaraju Karuna-C9013Z wrote:
> Hi,
>  
> We have a requirement to verify XML file validation error and
> well-formedness error using DOM Apis.
> We have used SAX api setFeature to acheive the same. So wanted to know
> whether DOMDocument::setStrictErrorChecking
> <http://xml.apache.org/xerces-c/apiDocs/classDOMDocument.html#z61_11>
> (bool strictErrorChecking)=0 also does the same?
> If not, can you let me know the correct API. 

There is no way with Xerces-C to validate a DOM instance without 
serializing and parsing it.

Dave