Exceptions when validation errors occur when parsing with Xerces C++

E

Ewan B

Hi,

I'm using Xerces to parse XML files using SAX2, and am wondering if
there is any information as to what exceptions are being thrown when
certain validation errors occur.

Taking a simple example schema

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" ...>
<xs:element name="root">
<xs:complexType>
.......
.......
<xs:attribute name="myAttribute" type="xs:double"/>
</xs:complexType>
</xs:element>
</xs:schema>



and instance document:

<?xml version="1.0" encoding="UTF-8"?>
<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
myAttribute="0.9i">
.......

</root>

Because myAttribute is not of type double, you'd expect the parser to
report an error, but then continue after reporting the error.


When parsing the document using the given example program
SAX2Count.exe, the error is reported, but then the parser bails out,
and an exception is caught using catch( ... ).

1. Does anyone know what type of exception is being thrown ?
2. Is there any way to allow the parser to continue after it finds
such an error?


thanks,

Ewan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top