Here you can find the source of getAttributeValueAsInteger(Node node, String attributeName, Integer defaultValue)
public static Integer getAttributeValueAsInteger(Node node, String attributeName, Integer defaultValue)
//package com.java2s; import org.w3c.dom.Node; public class Main { public static Integer getAttributeValueAsInteger(Node node, String attributeName, Integer defaultValue) { final Node attributeNode = node.getAttributes().getNamedItem(attributeName); return attributeNode != null ? Integer.parseInt(attributeNode.getTextContent()) : defaultValue; }/*from w w w .j a va 2 s . c o m*/ public static Integer getAttributeValueAsInteger(Node node, String attributeName) { final Node attributeNode = node.getAttributes().getNamedItem(attributeName); return attributeNode != null ? Integer.parseInt(attributeNode.getTextContent()) : null; } }