-1

I am writing a program in Java where I have to traverse through nodes and return the output value of an attribute of XML string.

How do I traverse through the path to get a attribute value in Java.

dur
  • 15,689
  • 25
  • 79
  • 125
codehacker
  • 381
  • 5
  • 15
  • First step would be to use an XML library ([here](http://stackoverflow.com/questions/373833/best-xml-parser-for-java) for example) and find the node you want to access, and then get its attribute value. – Gildas Nov 17 '16 at 12:21
  • Try googling for xpath. – Nathan Hughes Nov 20 '16 at 18:16

1 Answers1

0

Try this here:

https://docs.oracle.com/javase/tutorial/jaxp/dom/readingXML.html

at

Node Operations - Traversing nodes