Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #5  
Antiguo 18-08-2005
Avatar de mamcx
mamcx mamcx is offline
Moderador
 
Registrado: sep 2004
Ubicación: Medellín - Colombia
Posts: 3.941
Poder: 27
mamcx Tiene un aura espectacularmamcx Tiene un aura espectacularmamcx Tiene un aura espectacular
Precisamente en el foro de ThirdyParty de Borland salio esta pregunta, he aqui algunos componentes que te pueden ayudar:

http://www.compnet101.com/atagparser/

Un ejemplo que postearon en el foro:

Código Delphi [-]
 
  procedure TForm1.ATagParserTag(Sender: TObject; Tag: TTagElement;
    var Abort: Boolean);
  var
    Index: Integer;
  begin
    Index := FindTagID(Tag.Hash);
    Case Index Of
      TID_TABLE : { the table tag }
       Begin
         Case Tag.ElementType Of
           etSimpleTag, etComplexTag :
             // the < table > tag
             // Inc(TableCount) or you can create an instance
             // of TTagElement, assign the Tag to it and push
             // it on an object stack
           etEndTag :
             // the < / table > tag
         End;
       End;
      TID_TD    : { the table data tag }
       Begin
         Case Tag.ElementType Of
           etSimpleTag, etComplexTag :
             // the < td > tag
           etEndTag :
             // the < /td > tag
         End;
       End;
      TID_TR    : { the table row tag }
       Begin
         Case Tag.ElementType Of
           etSimpleTag, etComplexTag :
             // the < tr > tag
           etEndTag :
             // the < / tr > tag
         End;
       End;
    End;
  end;


http://www.yunqa.de/delphi/htmlparser/

Estos dos de pago, pero a bajo precio. El segundo lo he evaluado y quizas lo compre mas tarde...

Tambien, un ejemplo de como hacerlo automatizando Explorer:

Código Delphi [-]
  uses MSHTML_TLB;
  
  wb: TWebBrowser;
  
  wb.navigate(your html file);
  
  in wb.OnDocumentComplete write something like:
  
  var
   doc: IHTMLDocument2;
   btnText: string;
  begin
   doc := wb.document as IHTMLDocument2;
   //now find your element, let's say you want the text of the first button in 
  the file
   btnText := ((doc.tags('button')  as IHTMLElementCollection).item(0, '') as 
  IHTMLButtonElement).InnerText;

Ahora la vuelta para cargar la tabla es mas complicada... te toca mirar las ayudas en MSDN....

Seguro habra otros parsers por ahi... mirate en torry.net...
__________________
El malabarista.

Última edición por vtdeleon fecha: 01-11-2006 a las 16:51:28.
Responder Con Cita
 


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro


La franja horaria es GMT +2. Ahora son las 23:55:05.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi