Xerces C++: create XML according to XSD

Hi everyone.
I would like 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
[754 byte] By [ivr] at [2007-11-19 7:44:27]
# 1 Re: Xerces C++: create XML according to XSD
Impossible.

You must use XSL transformation (XALAN) to do what you want, and then use xerces with your XSD to validate your XML.

Regards,

Rui Santos
sardinhasantos at 2007-11-10 3:27:37 >
# 2 Re: Xerces C++: create XML according to XSD
hey!, .. santos!!

that is just i want to do... "to use xerces with your XSD to validate your XML" but i look for an basic example with the just code.

Do you have that for me?

Thanks very much!

Kisses from Seville (Spain)
e-va at 2007-11-10 3:28:42 >
# 3 Re: Xerces C++: create XML according to XSD
Hi,

I send an attach file with an example.
sardinhasantos at 2007-11-10 3:29:41 >
# 4 Re: Xerces C++: create XML according to XSD
Thank you very much

I will review and i say my comments.

Kisses
e-va at 2007-11-10 3:30:35 >