Hi, HELP!!! I went through all the possible help code from the net which tells me how to access the value/child of a tag. But what I need is to access the column values for each table. There are several tables in this xml file. So, I search for the table name through getElementsByTagName(), then I need to parse for the column-names. I'm not able to make it work with getNextSibling(). <table-name>hist_client</table-name> <data-element> <column-name>camp_id</column-name> <column-name>ccr_id</column-name> <column-name>record_id</column-name> <column-name>record_num</column-name> </data-element> -thanx
The method getElementsByTagName() returns a node list. You can iterate through it like -
It returns - Inside Text: camp_id Inside Text: ccr_id Inside Text: record_id Inside Text: record_num Isn't it what you want? Why do you need to use the getNextSibling() method? Cheers, Dan
William Butler Yeats: All life is a preparation for something that probably will never happen. Unless you make it happen.
posted 17 years ago
Hey Dan, Thanx for the response. What I'm trying to do is to read column-names from various tables. So, given a table-name, I just want it's column-names. That's why I'm searching for tagname 'table-name' -sunitha
Let's get him boys! We'll make him read this tiny ad!
Two software engineers solve most of the world's problems in one K&R sized book