I've tried creating my own method but ufortunatelly I couldnt fix it on this way.
Finally what I did is create an ArrayList and inlcude the NodeValue of each item in the Array. Then, now I have an Arraylist with all items from my QueryXML ready to use.
Final code:
ArrayList<String> IPtable=new ArrayList<String>();
QueryXML getNodes = new QueryXML(Queries);
NodeList IPs = getNodes.query();
for (int n=0; n<IPs.getLength();n++){
String ip =IPs.item(n).getNodeValue();
IPtable.add(ip);
}
ArrayList<String> IPSubnet=new ArrayList<String>();
QueryXML getSubnets = new QueryXML(Queries1);
NodeList subnets = getSubnets.query();
for (int s=0; s<subnets.getLength();s++){
String subnet =subnets.item(s).getNodeValue();
IPSubnet.add(subnet);
}
I'm not sure that It's the right way, but at less it works properlly and fast. I hope it'll useful for somebody else.