RE: [xsl] Test for malformed XML

Subject: RE: [xsl] Test for malformed XML
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 28 Apr 2008 02:53:13 +0100
> However, it may not be possible that the string I get is well 
> formed XML.  Is there a way for me to test whether a string 
> is well formed before I parse it?  Or maybe trap the error 
> that saxon returns when the parse attempt fails?

Saxon-SA has a simple try-catch facility.

Or you could write a Java extension of your own (it's not difficult), and
add the error handling there.

Michael Kay
http://www.saxonica.com/

Current Thread