Accessing value of nodes under a specific node only, using javascript in XML Posted May 11, 2012 · Edited May 11, 2012 by Peeyush Xml code is something like this <kids> <dennis> <age> 6 </age> <weight> 10 </weight> </dennis> <john> <age> 8 </age> <weight> 20 </weight> </john></kids><adults> <tom> <age> 36 </age> <weight> 110 </weight> </tom> <kramer> <age> 80 </age> <weight> 67 </weight> </kramer></adults> now i know how to access all the ages in the document, suppose i need to access the ages of only children, or only adults how will i do it using javascript? 2
Accessing value of nodes under a specific node only, using javascript
in XML
Posted · Edited by Peeyush
Xml code is something like this
now i know how to access all the ages in the document, suppose i need to access the ages of only children, or only adults how will i do it using javascript?