遇到一个比较棘手的需求:
开发语言Java;
程序定时读取HR邮箱中从前程无忧,智联发过来的简历(已实现,获到简历的HTML);
从简历HTML中解析获取想要的信息想(姓名,性别,电话,邮箱,工作经历,教育经历等等),保存到数据库中;
把数据库中的简历数据用HTML展示,可让HR进行筛选;
我现在卡在了简历HTML的解析信息这步,我用比较笨的方法,字符串定位截取,但是这样没办法比较准确的获取到想要信息。。。求助大家,看有没有好方法解析。。
It is better to use Jsoup to convert it into the corresponding Document object, which is more convenient when operating the corresponding elements. jsoup API: http://www.open-open.com/jsoup/
What about using regular expressions? Think more about possible matching formats and it should be OK.
It would be better to use regular capture
You can use jsoup
You can use JSOUP. I have done something similar before. This is very convenient and can process various tags and so on.
Prefer jsoup. jsoup has a select function, which is similar to the syntax of CSS selector. The API is simple and convenient than regular expressions.
1 Regular 2 HTML parsing library, it seems to be called "mithril" in Chinese
It is better to use Jsoup to convert it into the corresponding Document object, which is more convenient when operating the corresponding elements.
jsoup API: http://www.open-open.com/jsoup/
What about using regular expressions? Think more about possible matching formats and it should be OK.
It would be better to use regular capture
You can use jsoup
You can use JSOUP. I have done something similar before. This is very convenient and can process various tags and so on.
Prefer jsoup.
jsoup has a select function, which is similar to the syntax of CSS selector. The API is simple and convenient than regular expressions.
1 Regular
2 HTML parsing library, it seems to be called "mithril" in Chinese