问题
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