i want to read the xml with the hierarchy [closed]

Mr-Famous

New Member
I want to use DOM Parser for reading the xml file from java class.I dont know what will the tag. i want use the root element to access all the child nodesi will show the sample flow for the xml\[code\]<root><category name="books"> <books> <book> <name> Java </name> </book> <book> <name> Dotnet </name> </book> </books><category><category name="fruits"> <fruits> <fruit> <name> Apple </name> <fruit> <fruit> <name> graphs </name> <fruit> <fruits><category></root>\[/code\]In the above xml i want to read category name and with in the fruit tag child node values.please share dom method java code to read the format.
 
Back
Top