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

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top