470,870 Members | 1,539 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

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


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:attribute name="myAttribute" type="xs:double"/>

and instance document:

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


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?

Jul 20 '05 #1
0 1641

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Oskar Stuffer | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.