Xerces C++: create XML according to XSD

G

Gregory

Hi everyone.
I would like to create XML string or file according to a Schema (the
DOMWriter to output the XML string according to a Schema).
Does anyone know how to do that?

example:

DOMWriter *theSerializer =
((DOMImplementationLS*)impl)->createDOMWriter();
XMLFormatTarget myFormTarget = new LocalFileFormatTarget(outputFile);
DOMNode *docToWrite = doc;
if ( theSerializer->canSetFeature(XMLUni::fgDOMWRTFormatPrettyPrint,
true) )
theSerializer->setFeature(XMLUni::fgDOMWRTFormatPrettyPrint, true);
theSerializer->writeNode(myFormTarget ,*docToWrite);

Somewhere along the line I would like to set a schema location that
the
output has to obey. How can I add a schema location (preferably a
local one).

Thanks in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top