Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import org.w3c.dom.*;

public class Main {
    public static Node getNodeByTagName(Element node, String name) {
        NodeList nodeList = node.getElementsByTagName(name);
        if (nodeList != null && nodeList.getLength() > 0)
            return nodeList.item(0);
        else
            return null;
    }
}