R
Roger
I am transforming an XML stream from a third party application using
Xalan in a servlet. Every once in a while the application sends a
malformed XML document and I'm trying to find out which document it
is. I have created an ErrorListener class and registered it with the
Transformer object. The ErrorListener class is being called but when I
try to get the SourceLocator object back from the TransformerException
object I'm getting null returned. I've googled and can't find any code
examples that do anything than call getLocator() but I'm wondering if
I need to do configure anything else in the Transformer to cause it to
return a sourceLocator with the Exception or if I need to create my
own SourceLocator and pass it to the Transformer somehow? I would be
grateful for any guidance.
Regards
Roger
Xalan in a servlet. Every once in a while the application sends a
malformed XML document and I'm trying to find out which document it
is. I have created an ErrorListener class and registered it with the
Transformer object. The ErrorListener class is being called but when I
try to get the SourceLocator object back from the TransformerException
object I'm getting null returned. I've googled and can't find any code
examples that do anything than call getLocator() but I'm wondering if
I need to do configure anything else in the Transformer to cause it to
return a sourceLocator with the Exception or if I need to create my
own SourceLocator and pass it to the Transformer somehow? I would be
grateful for any guidance.
Regards
Roger