Java XML Node Name getTagName(Node labelNode)

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

Description

get Tag Name

License

Open Source License

Declaration

public static String getTagName(Node labelNode) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2013 Pivotal Software, Inc.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:// ww  w.  ja  v a2 s  .  co m
 *    Pivotal Software, Inc. - initial API and implementation
 *******************************************************************************/

import org.w3c.dom.Node;

public class Main {
    public static String getTagName(Node labelNode) {
        if (labelNode.getNodeType() == Node.ELEMENT_NODE) {
            return labelNode.getNodeName();
        }
        return null;
    }
}

Related

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