org.xml.sax.SAXParseException: The value of attribute "id" associated with an element type "Employee" must not contain the ‘<‘ character. at

I have the Issue when I’m trying to read XML parsing and I have input XML contains some special characters like &,<,> and “”.
While parsing XML using SAXParse api getting below Excpetions.

org.xml.sax.SAXParseException: The value of attribute "id" associated with an element type "Employee" must not contain the '<' character. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)

Please let me know how to replace special character before XML Parsing happens.
If any body have piece of code please share.

Its great help !.
-Vishwanath


Source: xml

Leave a Reply