SAX-PARSER errors when value contains <

Posted by jquerijero on 14-Apr-2015 16:10

I might just be missing something. The XML is built by msxsl.exe, so I think the XML is correct; however, we get a sax-parser error when the value has <.

Any ideas?

All Replies

Posted by Garry Hall on 14-Apr-2015 21:00

I did not see any attached XML. Is the value you a talking about an attribute value or an element value? What is the text of the error?

Posted by jquerijero on 15-Apr-2015 10:12

[quote user="Garry Hall"]

I did not see any attached XML. Is the value you a talking about an attribute value or an element value? What is the text of the error?

[/quote]

It's an XML value.

<SourceCode>DOORS&lt;</SourceCode>

AppServer log looks like this.

SAX parser error: SAX-PARSE-NEXT, Unexpected error. (14586) 

Posted by Garry Hall on 15-Apr-2015 10:47

I do not see this error when correctly coded. I tried 10.2B and 11.6. I am stepping through the code with SAX-PARSE_FIRST and SAX-PARSE-NEXT. I believe you are using SAX-PARSE-NEXT based on the error message.

I did see this error if I called SAX-PARSE-NEXT without first calling SAX-PARSE-FIRST, but that happens without the "<" as well.

I do not see any problems using SAX-PARSE.

If you still see the problem, please report it to Tech Support with a complete reproducible case.

Posted by jquerijero on 16-Apr-2015 13:48

[quote user="Garry Hall"]

I do not see this error when correctly coded. I tried 10.2B and 11.6. I am stepping through the code with SAX-PARSE_FIRST and SAX-PARSE-NEXT. I believe you are using SAX-PARSE-NEXT based on the error message.

I did see this error if I called SAX-PARSE-NEXT without first calling SAX-PARSE-FIRST, but that happens without the "<" as well.

I do not see any problems using SAX-PARSE.

If you still see the problem, please report it to Tech Support with a complete reproducible case.

[/quote]

Something is odd. Something is causing &lt; to be saved as < in the our database.  

Posted by Garry Hall on 16-Apr-2015 14:04

I would guess there is some unescaping going on, and it is not being escaped.

Posted by Alex Herbstritt on 16-Apr-2015 14:06

If you are obtaining the value via the CHARACTERS callback then it will have been converted to a 'DOOR<' by the parser. That is, the PARSER cleans up all of the escaped values within the character content of the nodes.

This thread is closed