473,396 Members | 1,734 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

getelementsbytagname question

I am trying to read an html file and get the info from a table. I am able
to extract the tables via
test = getelementsbytagname ("table")
then I do
for x = 1 to test(length)
msgbox x.innertext
msgbox x.innerhtml

next x

but how can I access the elements within this innertext or innerhtml.
I would like to see some of the img, td, tr tags within the table tag but I
dont know how to access them.

I would appreciate your help

Thanks
Jul 20 '05 #1
1 1831
"Danny" <da********@hotmail.com> wrote in message news:<xW*********************@news4.srv.hcvlny.cv. net>...
I am trying to read an html file and get the info from a table. I am able
to extract the tables via
test = getelementsbytagname ("table")
then I do
for x = 1 to test(length)
msgbox x.innertext
msgbox x.innerhtml

next x

but how can I access the elements within this innertext or innerhtml.
I would like to see some of the img, td, tr tags within the table tag but I
dont know how to access them.

I would appreciate your help

Thanks


1. Question has nothing to do with XML (unless you wish to use XSLT to
extract the data in which case you have to make sure the HTML
constitutes well formed XML (XHTML).
2. To do things the way you seem to want to you need to familiarise
yourself with the Document Object Model. There is plenty of material
available on the web.
3. shouldn't the code read for x = 1 to test.length
4. getElementsByTagname will return a node collection which you can
then access via DOM properties and methods (childnodes, nextnode etc).
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: 2obvious | last post by:
This is a pipe dream, I realize, but I'm trying to emulate the functionality of the W3C DOM-supported document.getElementsByTagName method under the very nightmarish Netscape 4. Through some...
23
by: Michel Bany | last post by:
I am trying to parse responseXML from an HTTP request. var doc = request.responseXML; var elements = doc.getElementsByTagName("*"); the last statement returns an empty collection when running from...
3
by: Andy | last post by:
Hello, I have the following example XML: <data> <package> <packageid>123</packageid> <package_article> <articleid>article1</articleid> </package_article> </package>
7
by: Dima | last post by:
Call to XmlNode.GetElementsByTagName returns XmlNodeList that stays in sync with XmlDocument thanks to events fired by XmlDocument. Once this list is created there is no way to remove its event...
1
by: Max | last post by:
Hello everyone! i would want to know if the getElementsByTagName() function starts to find the elements from documentElement comprising the same documentElement. XML example: <?xml...
1
by: Ben | last post by:
I have a web service that returns the following xml: <?xml version="1.0" encoding="utf-8" ?> <NewDataSet> <Addresses> <XML_F52E2B61-18A1-11d1-B105-00805F49916B> <CustomerAddressBase...
5
by: eBob.com | last post by:
I am so frustrated. I've been working all weekend on what I thought would be a simple script. I never find it easy to look at someone else's code, but if someone can help with this I would be...
2
by: =?Utf-8?B?cm9kY2hhcg==?= | last post by:
hey all, is there a way to delete or remove and item from the results of getElementsByTagName? thanks, rodchar
4
by: Ouray Viney | last post by:
Xml <ib>8.4.27.5</ib> python from xml.dom import minidom xmldoc = minidom.parse('C:\TestProfile.xml') xmldoc
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.