Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import org.w3c.dom.*;

public class Main {
    public static String getNodeProperty(Node node, String key) {
        NamedNodeMap attributes = node.getAttributes();
        Node item = attributes.getNamedItem(key);
        return item == null ? null : item.getTextContent();
    }
}