read the third node of xml based on second node in java

iAMamazing

New Member
how can i read the third node of the xml which is the product based on the second node product group using java. i want to get the products based on the product code\[code\] <?xml version="1.0" encoding="UTF-8"?> <Restaurant> <ProductGroup id="1"> <label>BURGERS</label> <image_url>burger.png</image_url> <Product> <label>Hamburger</label> <productCode>aab</productCode> <img_url>Hamburger.png</img_url> <price>129.46</price> </Product> <Product> <label>Cheeseburger</label> <productCode>cch</productCode> <img_url>Cheeseburger.png</img_url> <price>129.46</price> </Product> </ProductGroup> <ProductGroup id="2"> <label>FRIES/ONION RING</label> <image_url>friesonionring.png</image_url> <Product> <label>Fries</label> <productCode>FRS</productCode> <img_url>fries.png</img_url> <price>50.46</price> </Product> <Product> <label>Onion Rings</label> <productCode>ONR</productCode> <img_url>onionring.png</img_url> <price>50.46</price> </Product> </ProductGroup> </Restaurant>\[/code\]
 
Back
Top