Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Open Source License 

import org.w3c.dom.NamedNodeMap;

public class Main {
    /**
     * Parses the value of the given attribute as an boolean.
     * @param attributeName the name of the attribute.
     * @param map the map that contains all the attributes.
     * @return the float value.
     */
    public static boolean parseBoolean(String attributeName, NamedNodeMap map) {
        org.w3c.dom.Node attr = map.getNamedItem(attributeName);
        return attr != null ? Boolean.parseBoolean(attr.getTextContent()) : false;
    }
}