[xsd-users] Re: Never failing in Parsing

Boris Kolpackov boris at codesynthesis.com
Fri Aug 28 13:02:01 EDT 2009


Hi, 

ss ak <ssak22 at gmail.com> writes:

> Last Q hope fully...when do we use this type of parsing...i mean using the
> xerces calls directly..
> when i m using xsd.exe to generate my classes giving xsd as input...

The generated parsing and serialization functions perform all the
necessary low-level Xerces-C++ operations for most common cases.
However, there are situations where you may want to configure the
Xerces-C++ parser/serializer in a special way or reuse the same
parser/serializer to parse/serialize several documents. In such
situations you will need to write code similar to the one you 
have shown (taken from the performance example). In this particular
case, the direct interaction with Xerces-C++ is used to achieve two
things: (1) reuse the same parser to parse multiple XML documents
and (2) pre-load and cache the schema that will be used to validate
these documents.

Boris




More information about the xsd-users mailing list