Re: [Lazarus] How to use GetElementById?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: [Lazarus] How to use GetElementById?

silvioprog
Hi Benito,

Good parser. ;)

Instead of DOM, I could use GetPart, but I need something native with DOM. :/

Unfortunately I had to use a 'generic' option (...Item[NUMBER]...):

http://code.google.com/p/lazsolutions/source/browse/trunk/Demos/LSHTTPSend/MainFrm.pas#297

Anyway, thanks for the help. :)

2011/1/30 Benito van der Zander <[hidden email]>
Hi,
i believe the DOM access methods are the most annoying thing ever, you can't just define
a interface for all languages and expect it to be nice.

Doesn't the LCL contains an XPath-parser?
Then you could just use:
html//div[@id="currency_converter_result"]/text()

If not, you can use my parser from http://benibela.de/sources_en.html#internettools

Benito

--
Silvio Cl├ęcio
Blog. blog.silvioprog.com.br
Twitter. twitter.com/silvioprog


--
_______________________________________________
Lazarus mailing list
[hidden email]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus