xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: peter murray-rust <pm286 AT cam.ac.uk>
- To: xom-interest <xom-interest AT lists.ibiblio.org>
- Subject: [XOM-interest] Error output stream
- Date: Wed, 14 Dec 2005 21:30:10 +0000
Using xom1.1+junit:
If I parse an XML file with an error as in the following:
String test2S = "<cml>";
Document doc2 = null;
try {
doc2 = new Builder().build(new StringReader(test2S));
fail("should throw parsing exception");
} catch (ParsingException e) {
assertEquals("should throw ", "XML document structures must start and end within the same entity.", e.getMessage());
}
I can catch the error, but I also get the following on the console:
[Fatal Error] :1:6: XML document structures must start and end within the same entity.
Is there a way of disabling this message? I sometimes deliberately want to test whether a file (e.g. HTML) is well-formed and don't want any other output.
P.
Peter Murray-Rust
Unilever Centre for Molecular Sciences Informatics
University of Cambridge,
Lensfield Road, Cambridge CB2 1EW, UK
+44-1223-763069
-
[XOM-interest] Maven 2 XOM dependencies,
Adam Constabaris, 12/13/2005
- Re: [XOM-interest] Maven 2 XOM dependencies, Steve Loughran, 12/13/2005
-
[XOM-interest] Error output stream,
peter murray-rust, 12/14/2005
-
Re: [XOM-interest] Error output stream,
Elliotte Rusty Harold, 12/15/2005
- Re: [XOM-interest] Error output stream, Michael Kay, 12/16/2005
- Re: [XOM-interest] Error output stream, peter murray-rust, 12/16/2005
-
Re: [XOM-interest] Error output stream,
Elliotte Rusty Harold, 12/15/2005
-
Re: [XOM-interest] Maven 2 XOM dependencies,
Elliotte Harold, 12/19/2005
- Re: [XOM-interest] Maven 2 XOM dependencies, Adam Constabaris, 12/19/2005
Archive powered by MHonArc 2.6.24.