[Lazarus] [TIP] LazSolutions - How to get HTML content?

Benito van der Zander benito at benibela.de
Sun Aug 28 12:55:27 CEST 2011


> How can I get exact element from the HTML and/or XML content (like 
> with nokogiri <http://nokogiri.org/>) ? 
I'm working on a few classes to do that. 
(http://benibela.de/sources_en.html#internettools, although it doesn't 
support css-selectors (yet) )
The nokogiri example would look like this:

var tree: TTreeParser;
begin
tree := TTreeParser.create();
tree.parseTree(    ... the document ... );
result := TPseudoXPathParser.evaluateToString('|//h3/a[@class="l"]', 
tree.getTree());|
...



On 28.08.2011 07:44, ik wrote:
> On Sat, Aug 27, 2011 at 23:43, silvioprog <silvioprog at gmail.com 
> <mailto:silvioprog at gmail.com>> wrote:
>
>     It's easy, it can be done in a single line, see:
>
>     http://code.google.com/p/lazsolutions/wiki/Tip?wl=en
>
>
> How can I get exact element from the HTML and/or XML content (like 
> with nokogiri <http://nokogiri.org/>) ?
> That can be very helpful imho :)
>
>
>     Enjoy! ^^
>
>     --
>     Silvio Clécio
>     ===============================================
>     Blog - <silvioprog.com.br <http://silvioprog.com.br>>
>     Twitter - <twitter.com/silvioprog <http://twitter.com/silvioprog>>
>     LazSolutions - <code.google.com/p/lazsolutions
>     <http://code.google.com/p/lazsolutions>>
>     LazWebSolutions - <code.google.com/p/lazwebsolutions
>     <http://code.google.com/p/lazwebsolutions>>
>     Lazarus-BR - <groups.google.com.br/group/lazarus-br?hl=pt-BR
>     <http://groups.google.com.br/group/lazarus-br?hl=pt-BR>>
>     ===============================================
>        * Conheça nosso canal IRC sobre Lazarus: #lazarus-br *
>     ===============================================
>     --
>     _______________________________________________
>     Lazarus mailing list
>     Lazarus at lists.lazarus.freepascal.org
>     <mailto:Lazarus at lists.lazarus.freepascal.org>
>     http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
>
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110828/853e4ec1/attachment-0003.html>


More information about the Lazarus mailing list