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
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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

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 connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
Suggested Courses

579 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