Parsing XML file containing HTML entities in Java without changing the XML

前端 未结 6 1278
一个人的身影
一个人的身影 2020-12-05 18:53

I have to parse a bunch of XML files in Java that sometimes -- and invalidly -- contain HTML entities such as , > and so forth. I

6条回答
  •  春和景丽
    2020-12-05 19:32

    Another approach, since you're not using a rigid OXM approach anyway. You might want to try using a less rigid parser such as JSoup? This will stop immediate problems with invalid XML schemas etc, but it will just devolve the problem into your code.

提交回复
热议问题