Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
/*
 * @author     kebin, ucchy
 * @license    LGPLv3
 * @copyright  Copyright kebin, ucchy 2013
 */

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

public class Main {

    protected static Node getNodeFromNodeList(NodeList list, String name) {

        for (int i = 0; i < list.getLength(); i++) {
            Node node = list.item(i);
            if (node.getNodeName().equals(name)) {
                return node;
            }
        }
        return null;
    }
}