Java XML Node Name getTagName(Node node)

Here you can find the source of getTagName(Node node)

Description

get Tag Name

License

Open Source License

Declaration

public static String getTagName(Node node) 

Method Source Code


//package com.java2s;
/*/* www.  j a v  a 2 s  . co  m*/
 * This file is part of the Jose Project
 * see http://jose-chess.sourceforge.net/
 * (c) 2002-2006 Peter Sch?fer
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 */

import org.w3c.dom.*;

public class Main {
    public static String getTagName(Node node) {
        if (node instanceof Element)
            return ((Element) node).getTagName();
        else
            return null;
    }
}

Related

  1. getNodes(Node node, String nodeName)
  2. getSimpleName(final Node node)
  3. getSubNodes(Node node, String subNodeName)
  4. getSubNodeValue(Node node, String nodeName, String subNodeName)
  5. getTagName(Node labelNode)
  6. getTagName(Node tag, boolean useJsfcTags)
  7. getTagNameWithoutPrefix(Node node)
  8. getTifDimension(Node node, String nodeName)
  9. getUnqualifiedNodeName(org.w3c.dom.Node node)