Edwin Dankert wrote:
Normally you use the underlying parser to perform the validation.
SAXReader reader = new SAXReader( parser.getXMLReader());
Document doc = reader.read( new InputSource( "file:test.xml"));

However, OP was asking about validating a DOM *in memory*. Isn't there a way to validate a Document instance without reading if from a file at the same time? This seems like a common use case; you build up a Document and want to make sure you've followed your DTD/schema before writing it out.

b


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
dom4j-user mailing list
dom4j-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to