Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2011-08

[TIP] LazSolutions - How to get HTML content?

6 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

silvioprog

It's easy, it can be done in a single line, see:

http://code.google.com/p/lazsolutions/wiki/Tip?wl=en

Enjoy! ^^

Silvio Cl?cio =============================================== Blog - <silvioprog.com.br> Twitter - <twitter.com/silvioprog> LazSolutions - <code.google.com/p/lazsolutions> LazWebSolutions - <code.google.com/p/lazwebsolutions> Lazarus-BR - <groups.google.com.br/group/lazarus-br?hl=pt-BR> =============================================== ? ?* Conhe?a nosso canal IRC sobre Lazarus: #lazarus-br * ===============================================

Reply by email

ik
to silvioprog
silvioprog 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 :)

Show quoted text 20 lines
Enjoy! ^^ -- Silvio Cl?cio =============================================== Blog - <silvioprog.com.br> Twitter - <twitter.com/silvioprog> LazSolutions - <code.google.com/p/lazsolutions> LazWebSolutions - <code.google.com/p/lazwebsolutions> Lazarus-BR - <groups.google.com.br/group/lazarus-br?hl=pt-BR> =============================================== * Conhe?a nosso canal IRC sobre Lazarus: #lazarus-br * =============================================== -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110828/d3e2ed2f/attachment.html>

Reply by email

Benito van der Zander
to ik
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('"l"]',
tree.getTree());|
...
ik wrote 43 lines
On Sat, Aug 27, 2011 at 23:43, silvioprog < <mailto:>> 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 <mailto:> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110828/853e4ec1/attachment.html>

Reply by email

silvioprog
to ik: How can I get exact element from the HTML and/or XML content (like with nokogiri…

2011/8/28 ik :

Show quoted text 9 lines
On Sat, Aug 27, 2011 at 23:43, silvioprog 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) ? That can be very helpful imho :)

You can use LSHTTPGetPart, LSHTTPGetHTMLDocument or LSHTTPGetXMLDocument. See demo in
">lazsolutions>trunk>Demos>LSHTTPSend".

Download the all sources of LazSolutions via SVN.

> > Enjoy! ^^
Silvio Cl?cio =============================================== Blog - <silvioprog.com.br> Twitter - <twitter.com/silvioprog> LazSolutions - <code.google.com/p/lazsolutions> LazWebSolutions - <code.google.com/p/lazwebsolutions> Lazarus-BR - <groups.google.com.br/group/lazarus-br?hl=pt-BR> =============================================== ? ?* Conhe?a nosso canal IRC sobre Lazarus: #lazarus-br * ===============================================

Reply by email

silvioprog
to Benito van der Zander: I'm working on a few classes to do that. (http://benibela.de/sources_en.html#internettools…

2011/8/28 Benito van der Zander :

Show quoted text 15 lines
How can I get exact element from the HTML and/or XML content (like with nokogiri) ? 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('"l"]', tree.getTree()); ...

Nice project. Congratulations! ;)

Silvio Cl?cio =============================================== Blog - <silvioprog.com.br> Twitter - <twitter.com/silvioprog> LazSolutions - <code.google.com/p/lazsolutions> LazWebSolutions - <code.google.com/p/lazwebsolutions> Lazarus-BR - <groups.google.com.br/group/lazarus-br?hl=pt-BR> =============================================== ? ?* Conhe?a nosso canal IRC sobre Lazarus: #lazarus-br * ===============================================

Reply by email

William Oliveira Ferreira
to silvioprog: 2011/8/28 ik : You can use LSHTTPGetPart, LSHTTPGetHTMLDocument or LSHTTPGetXMLDocument.…

I think i'll gonna use it on my little project...

thx
________________________________
William de Oliveira Ferreira
Bacharel em Sistemas de Informa??o

2011/8/28 silvioprog

Show quoted text 38 lines
2011/8/28 ik : > On Sat, Aug 27, 2011 at 23:43, silvioprog 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) ? > That can be very helpful imho :) You can use LSHTTPGetPart, LSHTTPGetHTMLDocument or LSHTTPGetXMLDocument. See demo in ">lazsolutions>trunk>Demos>LSHTTPSend". Download the all sources of LazSolutions via SVN. >> >> Enjoy! ^^ -- Silvio Cl?cio =============================================== Blog - <silvioprog.com.br> Twitter - <twitter.com/silvioprog> LazSolutions - <code.google.com/p/lazsolutions> LazWebSolutions - <code.google.com/p/lazwebsolutions> Lazarus-BR - <groups.google.com.br/group/lazarus-br?hl=pt-BR> =============================================== * Conhe?a nosso canal IRC sobre Lazarus: #lazarus-br * =============================================== -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110829/db35a51c/attachment.html>

Reply by email