Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] [Nux] [StaX] Validating an XML document with Xom

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: "Verachten Bruno" <Bruno.Verachten AT atosorigin.com>
  • To: <xom-interest AT lists.ibiblio.org>
  • Subject: [XOM-interest] [Nux] [StaX] Validating an XML document with Xom
  • Date: Wed, 15 Mar 2006 11:00:53 +0100

Hi,

I'm fairly new to NUX & XOM, I only downloaded the jars yesterday.
I'm trying to validate a BIG xml file thanks to XOM.
I found a snippet in the Javadoc, so I tried this :

Map schemaLocations = new HashMap();
schemaLocations.put(new File("/tmp/p2pio.xsd"),
"http://dsd.lbl.gov/p2pio-1.0";);
Builder builder = new
BuilderFactory().createW3CBuilder(schemaLocations);

That sounds good to me, except that I need a StaxBuilder.

StaxBuilder staxBuilder = new StaxBuilder();
Document document = staxBuilder.build(reader);

How can I link the two builders?

Thanks in advance,

Bruno Verachten




Archive powered by MHonArc 2.6.24.

Top of Page