Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//  it under the terms of the GNU Lesser General Public License as published by

import java.util.LinkedList;
import java.util.List;

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

public class Main {
    protected static List<Node> createRealNodeList(NodeList nodeList) {
        List<Node> realNodeList = new LinkedList<Node>();
        if (null != nodeList && nodeList.getLength() > 0) {
            for (int i = 0; i < nodeList.getLength(); ++i) {
                Node nextNode = nodeList.item(i);
                realNodeList.add(nextNode);
            }
        }
        return realNodeList;
    }
}