• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

xml's nested same element

 
Mortin kim
Ranch Hand
Posts: 44
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.,
I have one simple problem..on how to read xml doc nested same element..

Problem is like this :

XML File :
a sample xml file

<testxml>
<sonname>
<Fname>aaa</Fname>
<Lname>bbb</Lname>
</sonname>
<Fathername>
<Fname>aaa</Fname>
<Lname>bbb</Lname>
</Fathername>
</testxml>

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

Thanks
Kim
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic