get Float from XML Element attribute - Java XML

Java examples for XML:XML Attribute

Description

get Float from XML Element attribute

Demo Code


//package com.java2s;

import org.w3c.dom.Element;

public class Main {
    public static float getFloat(Element element, String attributeName) {

        return Float.parseFloat(element.getAttribute(attributeName));
    }/*  w  ww . jav a2 s  . c  o m*/
}

Related Tutorials