xsl-list
[Top] [All Lists]

RE: [xsl] Test for malformed XML

2008-04-27 18:53:42

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/


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>