Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
// Written by Tomer Gabel under the Apache License Version 2.0

import org.w3c.dom.Node;

public class Main {
    public static String getAttribute(Node node, String attributeName) {
        Node attribute = node.getAttributes().getNamedItem(attributeName);
        if (attribute != null) {
            return attribute.getNodeValue();
        }
        return null;
    }
}