private List<Node> asList(NodeList n) {
		return n.getLength() == 0 ? Collections.<Node> emptyList() : new NodeListWrapper(n);
	}
private List < Node > asList ( NodeList n ) { return n . getLength ( ) == 0 ? Collections . < Node > emptyList ( ) : new NodeListWrapper ( n ) ; }
http://stackoverflow.com/questions/19589231/can-i-iterate-through-a-nodelist-using-for-each-in-java