Java XML NodeList convertToArray(NodeList e)

Here you can find the source of convertToArray(NodeList e)

Description

convert To Array

License

Open Source License

Declaration

private static Node[] convertToArray(NodeList e) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

public class Main {
    private static Node[] convertToArray(NodeList e) {

        int nodeSize = e.getLength();

        Node[] output = new Node[nodeSize];
        Node tempo = null;/*from  w  w  w  .  j av  a 2  s.c  om*/

        for (int i = 0; i < nodeSize; i++) {

            tempo = e.item(i);

            output[i] = tempo;
        }

        return output;
    }
}

Related

  1. combine(final NodeList... nls)
  2. combineNodeLists(NodeList successfulReportList, NodeList failedAssertList)
  3. containsElementByValue(NodeList elements, String value)
  4. containsNature(NodeList nodes, String nature)
  5. convertNodelistToSet(NodeList xpathNodeSet)
  6. convertToArray(NodeList list)
  7. convertToElementList(org.w3c.dom.NodeList _nodeList)
  8. copyNodeList(NodeList nodeList)
  9. createNodeCollection(final NodeList nodeList)