Best Lightweight HTML Parser for Delphi
Asked Answered
M

4

8

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?

Mullite answered 29/4, 2010 at 0:7 Comment(0)
E
11

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.

Erikerika answered 29/4, 2010 at 1:2 Comment(0)
H
0

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

Hickox answered 29/4, 2010 at 21:47 Comment(0)
R
0

Had searched for a while useful html-parsers for Delphi. Got lucky with htmlp and HTMLParserEx.

Reconsider answered 29/9, 2022 at 14:48 Comment(0)
A
-3

To parsing small html, use regular expressions.

Asthenosphere answered 16/1, 2023 at 22:16 Comment(1)
For the love of god, never use regular expressions to parse HTMLOrnithine

© 2022 - 2024 — McMap. All rights reserved.