Reputation: 131
char *xsd__schema; /* required element of type xsd:schema */
char *__any;
In my C++ project, I have read the XML schema into a string : xsd__schema, and also read the xml file into a string : __any. how can I retrieve the data into C++'s variant from the string.
Upvotes: 0
Views: 1052
Reputation: 3554
If you want a small-size xml-parser you can use TinyXML:
TinyXML is a simple, small, C++ XML parser that can be easily integrating into other programs.
It can use files or just parse the xml from a buffer as you're having.
Upvotes: 1
Reputation: 31339
I don't completely understand the context of your question (are you trying to validate your xml? or just get data from it?), but either way your answer likely lies in using a 3rd party XML parsing library, lest you spend a fruitless part of your life reinventing the wheel. There are several quality cross-platform XML parsing libraries which support schema validation:
Upvotes: 1