code: public static List<Element> toElementList(NodeList nodeList) {
  		List<Element> elements = new ArrayList<Element>();
  		for (int i = 0; i < nodeList.getLength(); i++) {
  			Node node = nodeList.item(i);
  			if (node instanceof Element) {
  				elements.add((Element) node);
  			}
  		}
  		return elements;
  	}
docs: Gets all the elements out of a {@link NodeList}.
  @param nodeList the node list
  @return the elements