Stax does not ready characters like "“"

71 Views Asked by At

I'm doing a Sgml parse with Stax. The Sgml contains characters like "“ ”" and many others that is not replaced setting the UTF-8. The parse breaks and throws the following exception:

javax.xml.stream.XMLStreamException: ParseError at [row,col]:[6,22]
Message: The entity "lpar" was referenced, but not declared.

I have one another problem, I have some tags without a close tag, for exemple <coolspan> without a and tag . This break the parse.

I was thinking about create a method to replace all special characters and validate tags without a end tag. Someone already passed by a problem like this, and could show me a way to follow?

0

There are 0 best solutions below