File format for storing html parser rules

时光毁灭记忆、已成空白 提交于 2020-01-06 04:22:04

问题


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?


回答1:


You can try to use Clojure , Clojure can represent your config data and call Jsoup for parse




回答2:


Options include XPath and CSS selectors syntax. The latter is supported by Jsoup.



来源:https://stackoverflow.com/questions/14533989/file-format-for-storing-html-parser-rules

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!