ciao ragazzi
ho un file xml strutturato così
codice:
<valore1>
<valore2>
<valore3>
<valore4>
<valore5>
<valore6>
<tag></tag>
<numero></numero>
<nome></nome>
</valore6>
</valore5>
</valore4>
</valore3>
</valore2>
</valore1>
io generalmente mi limitavo a leggerli con un solo nodo
ora come faccio ad arrivare fino in fondo per estrarre i 3 valori?
codice:
List list2=rootNode.getChildren("valore1");
for (int k = 0; k < list2.size(); k++) {
Element node = (Element) list2.get(k);
System.out.println("tag Name : " + node.getChildText("tag"));
System.out.println("number: " + node.getChildText("numero"));
System.out.println(" Name : " + node.getChildText("nome"));
}