Here you can find the source of getNodeListLength(NodeList list)
Parameter | Description |
---|---|
list | a node list |
private static int getNodeListLength(NodeList list)
//package com.java2s; //License from project: Open Source License import org.w3c.dom.NodeList; public class Main { /**/* ww w.j a v a 2s.com*/ * @param list a node list * @return the length */ private static int getNodeListLength(NodeList list) { int length = 0; try { length = list.getLength(); } catch (NullPointerException e) { /* Avoid Java bug */ } return length; } }