Hi Christian, There's no way with DOM level 2 to validate a DOM tree. So, unless you can wait for DOM level 3, which will have this support, you're best bet will probably be to serialize your DOM tree into an in-memory structure like a byte array and then direct an InputSource at that structure.
Hope that helps, Neil Neil Graham XML Parser Development IBM Toronto Lab Phone: 905-413-3519, T/L 969-3519 E-mail: [EMAIL PROTECTED] Christian Geuer-Pollmann <[EMAIL PROTECTED]> on 09/28/2001 02:25:02 AM Please respond to [EMAIL PROTECTED] To: [EMAIL PROTECTED] cc: Subject: getElementById Question Hi all, I want to construct a document from scratch (not reading if from a file together with it's DTD or schema) and use the getElementById() method to catch a particular element. I don't know how I can define which DTD/Schema is (partly) responsible for my doc being created, so getElementById returns null every time (because my parser does not know which Attrs are of Type ID). How can I add this during document creation (without serialing/parsing with DTD) ? Thanks, Christian --------------------------------------------------------------------- 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]