Xerces DOM parser incredibly slow?

后端 未结 2 1674
暗喜
暗喜 2021-01-14 17:16

Currently, I am trying to clean up an HTML file using JTidy, convert it to XHTML and provide the results to a DOM parser. The following code is the result of these efforts:<

2条回答
  •  攒了一身酷
    2021-01-14 17:52

    Even when not validating, a XML parser needs to fetch the DTD, for example to support named character entities. You should look into implementing an EntityResolver that resolves the request for the DTD to a local copy.

提交回复
热议问题