Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import org.w3c.dom.*;

public class Main {
    static private boolean existNode(Node node, String nodeName, String textValue) {
        NodeList childs = node.getChildNodes();
        for (int i = 0; i < childs.getLength(); i++) {
            if (childs.item(i).getNodeName().equals(nodeName)
                    && childs.item(i).getTextContent().equals(textValue)) {
                return true;
            }
        }
        return false;
    }
}