Here you can find the source of convertToArray(NodeList e)
private static Node[] convertToArray(NodeList e)
//package com.java2s; //License from project: Open Source License import org.w3c.dom.Node; import org.w3c.dom.NodeList; public class Main { private static Node[] convertToArray(NodeList e) { int nodeSize = e.getLength(); Node[] output = new Node[nodeSize]; Node tempo = null;/*from w w w . j av a 2 s.c om*/ for (int i = 0; i < nodeSize; i++) { tempo = e.item(i); output[i] = tempo; } return output; } }