开发者

Setting a custom XOM EntityResolver

I need to not validate against a doctype, so I'd like to set a cust开发者_运维知识库om EntityResolver that accepts everything. I'm getting data back from tagsoup, so I know my data is well-formed and correct.

Furthermore, I need to rapidly hit a number of documents, so when I do this with the default EntityResolver, I get 503 from w3.org.

How, then, can I use a XOM builder with a custom entity resolver?


Use a custom XMLReader.

XMLReader reader = XMLReaderFactory.createXMLReader();
reader.setEntityResolver(new EntityResolver(){...});
Builder builder = new Builder( reader );
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜