get String from XML Element attribute - Java XML

Java examples for XML:XML Attribute

Description

get String from XML Element attribute

Demo Code


//package com.java2s;

import org.w3c.dom.Element;

public class Main {
    public static String getString(Element element, String attributeName) {
        return element.getAttribute(attributeName);
    }//from  w w w . j  ava  2 s  .c  om
}

Related Tutorials