[XOM-interest] Validating a Document against a schema

Elliotte Harold elharo at metalab.unc.edu
Wed May 21 09:13:41 EDT 2008


Lowell Kirsh wrote:
> I am currently validating a generated Document against its schema by
> first calling toXML() on it and then validating that String. I'm
> guessing there's a more efficient way to do this. Is there?
> 

You could stream the document through the validator, but if you're 
creating it with XOM and then validating it, I can't think of a better 
way. Off the top of my head I'm not aware of any schema validators that 
work directly on the XOM model.

-- 
Elliotte Rusty Harold  elharo at metalab.unc.edu
Java I/O 2nd Edition Just Published!
http://www.cafeaulait.org/books/javaio2/
http://www.amazon.com/exec/obidos/ISBN=0596527500/ref=nosim/cafeaulaitA/


More information about the XOM-interest mailing list