Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import org.w3c.dom.Node;

public class Main {
    public static boolean getChildBooleanValue(Node node) {
        Node child = node.getFirstChild();
        return getBooleanValue(child);
    }

    public static boolean getBooleanValue(Node node) {
        String value = node.getNodeValue();
        return parseBoolean(value);
    }

    public static boolean parseBoolean(String value) {
        if (value.trim().equalsIgnoreCase("true"))
            return true;
        else
            return false;
    }
}