File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes xml's nested same element  Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "xml Watch "xml New topic

xml's nested same element

Mortin kim
Ranch Hand

Joined: Nov 15, 2007
Posts: 44
I have one simple problem..on how to read xml doc nested same element..

Problem is like this :

XML File :
a sample xml file


to papulate the values into filed I am doing like this..

document.getElementById('Fname').value = xmlDoc.getElementsByTagName("Fname")[0].childNodes[0].nodeValue;
document.getElementById('Lname').value = xmlDoc.getElementsByTagName("Lname")[0].childNodes[0].nodeValue;

But how to get the nested same elment Fname,Lname of <Fathername> node..?

I agree. Here's the link:
subject: xml's nested same element
It's not a secret anymore!