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.Node;

public class Main {
    /**
     * Gets the tag value without namespace.
     * 
     * @param n
     *            the n
     * @return the tag value without namespace
     */
    public static String getTagValueWithoutNamespace(Node n) {
        if (n != null) {
            String tag = n.getNodeName();
            return tag.substring(tag.indexOf(":") + 1, tag.length());
        }
        return null;
    }
}