org.ibiblio.lists.xom-interest
2011-04-07 12:10:18 UTC
Hello.
Currently, I'm doing the following:
xv = BuilderPool.GLOBAL_POOL.getMSVBuilder(new File(schema_path).toURI());
... where schema_path points to the RELAX-NG file I'm validating XML against.
And then:
doc = xv.build (data);
... where data is an input stream containing XML data.
The problem: I'd like to read and parse an XML tree BEFORE validating. There
doesn't really seem to be a way to do this beyond re-serializing the tree to
a stream and then calling the above (which seems a pretty roundabout way of
doing things).
Any ideas?
Currently, I'm doing the following:
xv = BuilderPool.GLOBAL_POOL.getMSVBuilder(new File(schema_path).toURI());
... where schema_path points to the RELAX-NG file I'm validating XML against.
And then:
doc = xv.build (data);
... where data is an input stream containing XML data.
The problem: I'd like to read and parse an XML tree BEFORE validating. There
doesn't really seem to be a way to do this beyond re-serializing the tree to
a stream and then calling the above (which seems a pretty roundabout way of
doing things).
Any ideas?