Ciao; scusami ma invece di:
codice:
for (node = doc.getDocumentElement().getFirstChild();node != null; node = node.getNextSibling()) {
if (node.getLocalName()!=null){
if (node.getLocalName().equalsIgnoreCase("funzione")){
System.out.println("nodo funzione: " + node.getLocalName());
System.out.println("at: " + node.getAttributes()).getNamedItem("id"));
NodeList listaNodiFz = node.getChildNodes();
for(int u=0;u<listaNodiFz.getLength();u++){
if(listaNodiFz.item(u).getNodeName().equals("profilo")) {
System.out.println("DA LISTA : + listaNodiFz.item(u).getNodeName());
System.out.println("val: " + listaNodiFz.item(u).getNodeValue());
}
vedendo il tuo file xml non dovresti fare:
codice:
for (node = doc.getDocumentElement().getFirstChild();node != null; node = node.getNextSibling()) {
if (node.getLocalName()!=null){
if (node.getLocalName().equalsIgnoreCase("funzione")){
System.out.println("nodo funzione: " + node.getLocalName());
System.out.println("at: " + node.getAttributes()).getNamedItem("id"));
NodeList listaNodiFz = node.getChildNodes();
for(int u=0;u<listaNodiFz.getLength();u++){
if(listaNodiFz.item(u).getNodeName().equals("minnie")) {
System.out.println("DA LISTA : + listaNodiFz.item(u).getNodeName());
System.out.println("val: " + listaNodiFz.item(u).getNodeValue());
}
Fammi sapere se così funzica, ciao