Here you can find the source of getArray(NodeList nodeList)
public static Node[] getArray(NodeList nodeList)
//package com.java2s; // %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt import org.w3c.dom.Node; import org.w3c.dom.NodeList; public class Main { /**// w ww .j av a 2 s . c o m * Returns an array version of the passed NodeList. Used to work around DOM design issues. */ public static Node[] getArray(NodeList nodeList) { Node[] nodes = new Node[nodeList.getLength()]; for (int i = 0; i < nodeList.getLength(); i++) nodes[i] = nodeList.item(i); return nodes; } }