Short answer: no, Xerces does no such document transformations. It parses, it serializes, it provides methods for you to add, delete, and modify various types of document nodes, but it doesn't automatically make such modifications (except adding default values where possible during parsing).
Longer answer: I don't know whether any tool does what you want. In fact, I'm not entirely sure what you want, or whether it's possible. If a document is schema-invalid, I'm not sure how any processor could know how to make it valid. Should it throw out invalid elements and attributes? Change their names and/or values? Insert required elements and attributes? Other than providing default values, neither a schema nor a DTD provides much information that would help with such a transformation. You might be able to write a program that applies certain rules in order to generate a specific type of document, but it's hard to imagine a general-purpose tool that makes invalid documents into useful valid documents. But someone else on the list may have a more fertile imagination, or wider knowledge, than I. -----Original Message----- From: Sharma, Navin [mailto:[EMAIL PROTECTED] Sent: Friday, March 30, 2007 3:13 AM To: [EMAIL PROTECTED]; [email protected]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Query DOMBuilder and DOMWriter Hi, Have test.xml and test.xsd, where test.xml is not valid against xsd. Is it possible to generate a valid xml say, testOut.xml, providing invalid test.xml as input. The testOut.xml should be a valid xml that conforms to test.xsd. Is this possible using Xerces and C++ or something else. Any thoughts? Best Regards Navin ======================================================================== ====== Please access the attached hyperlink for an important electronic communications disclaimer: http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html ======================================================================== ====== --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
