[xsd-users] Document parsing failed
Boris Kolpackov
boris at codesynthesis.com
Fri Jul 13 04:13:51 EDT 2007
Hi Johan,
Boer den, Johan J (NSC) <Johan.denBoer at NS.NL> writes:
> I am having the following problem. We generate C++ classes from our xsd
> schemas. Later we want to do this action
>
> string xmlmessage = ................ // our xml message containg the
> xsd
>
> stringstream ifs;
> ifs << xmlmessage;
>
> auto_ptr<PCS_CALCULATE_PRICES_ANSWER>
> pcsAnswer(PCS_CALCULATE_PRICES_ANSWER_(ifs));
>
> We got an std::exception with : instance document parsing failed.
This is most likely related to the failure to validate the XML document
because the schema could not be found for it. Please see:
http://www.codesynthesis.com/projects/xsd/documentation/cxx/tree/faq/#2
Also you may want to catch and print the exception being thrown to get
more information:
try
{
// parsing code goes here
}
catch (const xml_schema::exception& e)
{
cerr << e << endl;
}
hth,
-boris
More information about the xsd-users
mailing list