468,510 Members | 1,733 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,510 developers. It's quick & easy.

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

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
Jul 20 '05 #1
0 1572

This discussion thread is closed

Replies have been disabled for this discussion.

By using this site, you agree to our Privacy Policy and Terms of Use.