XML : XML Traversal: find a specific child node

I have the following XML file -

  <?xml version="1.0" encoding="UTF-8"?>      <prj:Flow xmlns:prj="url1" xmlns:com="url2" xmlns:ns2="url3" xmlns:con="url4" xmlns:ns0="url5" xmlns:ns1="url6" xmlns:ns3="url7">      <prj:layout comp="abcd">        <prj:prop>           <prj:property name="Hardik" value="5000"/>           <prj:bond att="1"> New Value/hello/mode </prj:bond>        </prj:prop>        <prj:bond att="1"> New Value </prj:bond>      </prj:layout>      <prj:layout comp="efgh">        <prj:prop>           <prj:property name="Vipul" value="6000"/>           <prj:bond att="2"> New Value/bye/code </prj:bond>        </prj:prop>        <prj:bond att="2"> New Value </prj:bond>      </prj:layout>      </prj:Flow>    

Here each <layout> tag has two children - <prop> and <bond>. My requirement is to get only the <bond> data(attribute and text) from the layout tag and not the one present under the <prop> tag. How do I achieve this using jquery only? Any help is appreciated. Thanks !

No comments:

Post a Comment