Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JAXP TrAX: How to propogate SAXExceptions?

Status
Not open for further replies.

fanningpj

Programmer
Dec 12, 2001
11
IE
I have a system doing the following:
SAX Pipe(input) -> SAXSource -> Xalan -> SAXResult -> SAX Pipe(output)

If I get an exception in the SAX Pipe(output), I want to pass a SAXException back down the program stack. Xalan currently swallows my SAXExceptions. Does anyone know of a feature that I can set so that Xalan will report output errors to an errorhandler?
 
I found the answer to my own query. The javax.xml.transform.Transformer now has a setErrorListener(...) method. Once an ErrorListener is attached to the Transformer object, any SAXExceptions thrown in my pipe will be passed on through the Transformer to the ErrorListener.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top