get XML Element Name - Android XML

Android examples for XML:XML Element

Description

get XML Element Name

Demo Code


//package com.java2s;

import org.w3c.dom.Element;

public class Main {
    public static String getElementName(Element element) {
        if (element.getNodeType() == Element.ELEMENT_NODE)
            return element.getNodeName();
        else//from   w w  w  .  j a  v a2s .com
            return null;
    }
}

Related Tutorials