xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
- To: peter murray-rust <pm286 AT cam.ac.uk>
- Cc: xom-interest <xom-interest AT lists.ibiblio.org>
- Subject: Re: [XOM-interest] Error output stream
- Date: Thu, 15 Dec 2005 20:46:56 +0100
peter murray-rust wrote:
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.
This is Xerces talking. I've complained about that. In fact there may be a rejected bug in their Bugzilla about that. For now all you can easily do is call System.setErr in your setUp method and reversing it in your tearDown method. I do this in various places in nu.xom.test such as BuilderTest:
protected void setUp() {
System.setErr(new PrintStream(new ByteArrayOutputStream()));
}
protected void tearDown() {
System.setErr(systemErr);
}
--
Elliotte Rusty Harold elharo AT metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim
-
[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.