Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] Validating after parsing?

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: org.ibiblio.lists.xom-interest AT coreland.ath.cx
  • To: xom-interest AT lists.ibiblio.org
  • Subject: [XOM-interest] Validating after parsing?
  • Date: Thu, 7 Apr 2011 12:10:18 +0000

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?





Archive powered by MHonArc 2.6.24.

Top of Page