xerces-c-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From caox <c...@lightpole.net>
Subject Re: how to validate the input source?
Date Wed, 15 Jul 2009 09:17:41 GMT
Alberto Massari 写道:
> Have a look at the MemParse sample.
>
> Alberto
>
> caox wrote:
>> Hi
>>    I am using the xercesc3.0.1 for xml parsing.
>>    How can I check whether the input source from a byte steam is 
>> well-formed xml format? Since I want my program to raise an exception 
>> when it receives files other than xml.
>>    Appreciate your help.
>>  
>
>
Thanks a lot. I have tried the sample DOMPrint which could throw an 
exception as expect when encountered a bad-formed xml file.
But when I use xqilla to create a DOMParser, it seems can accept all 
kinds of files. The code is below:

AutoRelease<DOMLSParser> 
parser(xqillaImplementation->createLSParser(DOMImplementationLS::MODE_SYNCHRONOUS, 
0));

And this puzzled me a lot.

Mime
View raw message