Best Lightweight HTML Parser for Delphi

妖精的绣舞 提交于 2019-12-18 04:14:07

问题


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?


回答1:


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.




回答2:


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



来源:https://stackoverflow.com/questions/2733972/best-lightweight-html-parser-for-delphi

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