Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

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

public class Main {
    public static int getIntValue(Element paramElement) {
        return Integer.valueOf(getText(paramElement)).intValue();
    }

    public static String getText(Element paramElement) {
        NodeList localNodeList = paramElement.getChildNodes();
        int i = localNodeList.getLength();
        for (int j = 0; j < i; ++j) {
            Node localNode = localNodeList.item(j);
            if (localNode.getNodeType() == 3)
                return localNode.getNodeValue();
        }
        return "";
    }
}