A valid XML file has one element at top level; all others must be nested inside it, so the example is not valid. Probably that's only marginally relevant to the question you're asking, though. Xerces can validate a file (and fill in default values, etc) according to a DTD or schema, but does not generate different startElement callbacks automatically. If you wanted to switch startElement callbacks based on the name of the root element, you'd have to supply your own startElement function that did this.
Jeff ----- Original Message ----- From: Martin Gülich To: [EMAIL PROTECTED] Sent: Thursday, August 12, 2004 4:24 AM Subject: Use DTD/XSD with startElement? Hello! I am wondering if anyone knows of a way to start parsing an XML-file and giving the corresponding DTD or XML Schema definition as input, with the purpose of somehow making Xerces automatically use a separate callback method for each element. Suppose this is the XML file: <TAG1>.</TAG1> <TAG2>.</TAG2> ... --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]