[xsd-users] Something wrong

Boris Kolpackov boris at codesynthesis.com
Thu May 22 13:03:23 EDT 2008


Hi Mirek,

Miroslaw Madej <dabee21 at gmail.com> writes:

> I have an xml document with element's name poz-pak and in source code
> generated from schema I have class poz_pak and when I try to parse this xml
> file I have many errors unknown element .

The generated code will still use "poz-pak" when comparing element
names that come from XML. It is just the C++ identifier was escaped
to poz_pak ('-' is not allowed in C++ identifiers).

I think you get those errors because XML Schema validation is enabled
but the schema is either not specified or cannot be found. Please see
the first three questions in the "Parsing" section of the FAQ:

http://wiki.codesynthesis.com/Tree/FAQ

If you are still having problems parsing this, send a small test
case (schema, XML file, and the test driver) that reproduces the
problem and I will take a look

Boris




More information about the xsd-users mailing list