At 12.10 12/07/2005 -0400, Hank Wallace wrote:
I don't believe that is true.  I can pass the following string and
Xerces will not raise an exception.

"<xml><invalid>This is text</badtag>"

To check if the parse operation succeeded, call getErrorCount() and check if it's 0; if you need more comprehensive error messages, you will have to install an error handler using setErrorHandler().

Hope this helps,
Alberto


Thanks,
Hank

On 7/12/05, Alberto Massari <[EMAIL PROTECTED]> wrote:
> At 11.34 12/07/2005 -0400, Hank Wallace wrote:
> >I have searched the FAQ and Google'd, but I cannot find a way to
> >validate that the XML being processed is well formed. I don't want to
> >validate against a DTD.  Can someone point me in the right direction?
>
> If you are talking about Xerces-C++, it will not accept a
> non-well-formed XML; so, if the call to parse() succeeds, it's well-formed.
>
> Alberto
>
>
>


Reply via email to