[xsd-users] Roundtrip errors with CXX-Tree

Boris Kolpackov boris at codesynthesis.com
Tue Mar 11 02:43:16 EDT 2008


Hi Russell,

Russell C. Johns <johns at lanl.gov> writes:

> terminate called after throwing an instance of
> 'xsd::cxx::tree::parsing<char>'
>   what():  instance document parsing failed

Try to catch this exception and print it as you did with the
serialization case:

try
{
  std::auto_ptr<TEST::input::TestInput> tif
    (TEST::input::TEST_input(argv[1],0,props));
}
catch (const xml_schema::exception& e)
{
  std::cerr << e << std::endl;
}

This way you will get more information about the error.


> I have tried this on windows and linux, with versions 2.3, 3.0, and 3.1
> all produce the same error...
>
> is there an error in the parsing design?

There might be, or it could be the way you construct the object model
from the text format (note also that XMLSpy is famous for successfully
parsing invalid XML documents and schemas). If printing the error does
not shed any new light, we will need a compilable test case to debug.

Boris




More information about the xsd-users mailing list