[xsd-users] Parsing XML string to tree object issue

Boris Kolpackov boris at codesynthesis.com
Mon Mar 30 09:47:21 EDT 2020


Tolga Hakan ODUNCU <thakanoduncu at gmail.com> writes:

> std::istringstream iss (requestContainerStr);   //  requestContainerStr is a string that has valid xml format.
> std::unique_ptr<Etsi103221::RequestContainer> xsd_RequestContainer (Etsi103221::X1Request (iss));
> 
> I get the exception "instance document parsing failed"

Print the exception to get more information, as described in Section
2.2, "Error Handling":

https://codesynthesis.com/projects/xsd/documentation/cxx/tree/manual/#2.2

It most likely has to do with XML Schema validation; see the relevant
questions in the FAQ:

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


> My question is that, are generated codes with cxx-tree command sufficient
> for this parsing operation [...]

Yes, it should be.



More information about the xsd-users mailing list