How can I get the values displayed in an HTMLTableCell using DOM?

Posted on 2005-03-01
Medium Priority
Last Modified: 2013-11-17
I'm writing an app in C++Builder and I'm trying to read the values located in cells in a table on a web page.  I have the following code:

       TComInterface<IHTMLDocument2> Doc;
        if( Doc )
            TComInterface<IHTMLElementCollection> Forms;
            if( Forms )
                long count = 0;

                for(long x = 0; x < count; ++x)
                    TVariant item = x;
                    TVariant index = 0;
                    TComInterface<IDispatch> Disp;

                    Forms->item(item, index, &Disp);
                    if( Disp )
                        TComInterface<IHTMLTable2> Table;
                        if( Table )
                          TComInterface<IHTMLElementCollection> Cells;
                          long count_cells=0;

                          for(long y=0;y < count_cells;y++)
                            TVariant cell_item = y;
                            TVariant cell_index = 0;
                            TComInterface<IDispatch> cell_Disp;


                             TComInterface<IHTMLTableCell> Cell;

                              WideString Value;
                              // What to put here to get data?


Am I heading in the wrong direction?  HTMLTableCell doesn't seem to provide any access to the data displayed in it/

Thanks for looking.

Mitch McInelly
Question by:agencysoft
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
LVL 16

Accepted Solution

George Tokas earned 1500 total points
ID: 13463508
Hi there...
Check out:

That is something similar with what you want to do...
If you need any help in translation from Delphi come back...
The link describes what you want (as I understand it anyway ) but using Borland's TWebBrowser which is the same with TCppWebBrowser on BCB..


Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question