Java XML NodeList getNodeListLength(NodeList list)

Here you can find the source of getNodeListLength(NodeList list)

Description

get Node List Length

License

Open Source License

Parameter

Parameter Description
list a node list

Return

the length

Declaration

private static int getNodeListLength(NodeList list) 

Method Source Code

//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;
    }
}

Related

  1. getNodeList(NodeList nodeList)
  2. getNodeList(NodeList nodeList)
  3. getNodeListAsList(NodeList nl)
  4. getNodeListByName(Node node, String name, List finalNodeList)
  5. getNodeListItems(NodeList nodeList)
  6. getNodes(String tagName, NodeList nodes)
  7. getNodesByName(String name, NodeList nodeList)
  8. getNodesOfType(NodeList list, short type)
  9. getNodeTrimValue(NodeList nodeList)