用于存储HTML解析器规则文件格式 [英] File format for storing html parser rules
本文介绍了用于存储HTML解析器规则文件格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用Jsoup分析一个网页随着时间的推移其结构的变化。对于现在的分析配置是用Java编写的,所以我有每个规则被修改的时间来发布新的版本。结果
是否有某种我可以用它来解析配置存储在一个外部文件json-或基于XML的标记语言的?
I'm using Jsoup to parse a page which structure changes over time. For now the parsing config is written in Java so I have to issue a new build each time the rules get modified.
Is there some sort of json- or xml-based markup language I could use to store the parsing config in an external file?
推荐答案
选项包括XPath和CSS选择器的语法。后者是由Jsoup支持
Options include XPath and CSS selectors syntax. The latter is supported by Jsoup.
这篇关于用于存储HTML解析器规则文件格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文