xml-validation

How to parse invalid (bad / not well-formed) XML?

僤鯓⒐⒋嵵緔 提交于 2019-11-25 22:16:13
问题 Currently, I\'m working on a feature that involves parsing XML that we receive from another product. I decided to run some tests against some actual customer data, and it looks like the other product is allowing input from users that should be considered invalid. Anyways, I still have to try and figure out a way to parse it. We\'re using javax.xml.parsers.DocumentBuilder and I\'m getting an error on input that looks like the following. <xml> ... <description>Example:Description:<THIS-IS-PART