Ben Munat
Tue, 20 Sep 2005 08:32:27 -0700
Edwin Dankert wrote:
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.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"));
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