Hi all, I have a DOM object which contains a xml document and a reference to its xsd. I would like to validate the DOM against the XSD it contains. The only way I found so far is : - serialize the DOM - parse the dom activating validation. Is there another way to do it ? Does not sound like a really efficient method, no ? I parse a document which has already been parsed !!
/ JeanLouis<br /><i>"software development has been, is, and will remain fundamentally hard" (Grady Booch)</i><br /> <br />Take a look at <a href="http://www.epfwiki.net/wikis/openup/" target="_blank" rel="nofollow">Agile OpenUP</a> in the Eclipse community
Unfortunately this is only possible if you are in compliance with DOM Level 3 core specs that supports iterative load-validate-change-save operations and DOM events. If you are using the new version of Xerces ie., Xerces2-J from Apache and DOM Level 3 compliant namespace, you may be able to use DOMConfig to validate the document in memory. Checkout this article for more details. [ May 07, 2003: Message edited by: Ajith Kallambella ]
Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
Joined: Nov 12, 2001
Thanks Ajith, That's what I thought. You confirmation will help me saving a lot of time in research