Android XML Element Attribute Get getIntAttribute(Element el, String name)

Here you can find the source of getIntAttribute(Element el, String name)

Description

get Int Attribute

Declaration

public static int getIntAttribute(Element el, String name) 

Method Source Code

//package com.java2s;

import org.w3c.dom.Element;

public class Main {
    public static int getIntAttribute(Element el, String name) {
        String s = el.getAttribute(name);
        if (s != null && s.length() > 0) {
            return Integer.parseInt(s);
        }// www  . jav  a  2s. c om
        return 0;
    }
}

Related

  1. getAttributeValue(Element elem, String name)
  2. getBooleanAttribute(Element el, String name)
  3. processAnyAttributes(Element element, Map anyAttributes)
  4. getNodeAttrValue(Element parent, String nodeName, String attrName)