Best Lightweight HTML Parser for Delphi

2019-01-24 11:18发布

I need to parse out the values from some data from select boxes.

Example: <option value="1">Apple</option><option value="2">Chicken</option>

Usage: If option = apple then get value.

Any suggestions?

2条回答
老娘就宠你
2楼-- · 2019-01-24 11:56

DIHtmlParser? I'm not sure how "lightweight" it is, but Ralf's components always seemed to be well put together. He's also normally active and response on Embarcadero's Forums.

If it's a one-off and not too complex, you could probably split on symbols manually.

查看更多
神经病院院长
3楼-- · 2019-01-24 11:58

Another option would be the standard XML Parsers...that is if your document meets the XHTML standards.

查看更多
登录 后发表回答