Hi All,
I am new to XML can any one help me to display how many Cell elements
in each Row node and the text between the Data Nodes of each cell. I am able
to get the no of rows using (doc in below code is my XML doc to be parsed)
NodeList rowLst = doc.getElementsByTagName("Row");
and after that i am looping through row count by using rowLst.getLength().
and i am struck from there to count no of Cells in each row and extract text
value of Data element.
Thanks in advance for the help.
*My XML Tree*
<table>
<Row>
<Cell><Data>Anne1</Data></Cell>
<Cell><Data>[email protected]</Data></Cell>
<Cell><Data>Singapore</Data></Cell>
</Row>
<Row>
<Cell><Data>Anne2</Data></Cell>
<Cell><Data>[email protected]</Data></Cell>
<Cell><Data>Singapore Bedok</Data></Cell>
</Row>
<Row>
<Cell><Data>Anne3</Data></Cell>
<Cell><Data>[email protected]</Data></Cell>
<Cell>Singapore Bedok</Data></Cell>
</Row>
</table>
--
----------------------------------------------------
Thanks & Regards
Murali . Anne
Singapore Polytechnic
500 Dover Road
Singapore - 139651
Office : +65 - 68707978
Mobile : +65 - 81137151
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/javaprogrammingwithpassion?hl=en