You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by "Rosenauer, Karin" <Ka...@gft.com> on 2004/07/20 10:59:45 UTC

XML document creation & schema validation

Hi there, 

Using xerces-2_6_2  and JDK1.3 or 1.4 I would like to do the following: 
--create a XML document that is valid regarding a given XML Schema. 
--creation and validation should be done as performant as possible (SAX
rather than DOM)
 
I tried to create a pipeline of XMLDocumentHandler objects:
XMLSchemaValidator-->SAXParser
The SAXParser object was only used to encapsulate a XMLSerializer object
and to delegate the SAX events coming from the XMLSchemaValidator.
In order to create the XML document I explicitly call the SAX event
handler methods on the XMLSchemaValidator object: startDocument(),
startElement(), etc. 
Till now I'm running in all kind of problems with this approach. 

Can you tell me: 
-- if there is something wrong with this pipeline approach ( so that I
should better give it up for some reason) 
-- if there is another (better, simpler) approach

Thank you,
Karin