Here you can find the source of parseInt(Node node)
public static int parseInt(Node node)
//package com.java2s; import java.util.Objects; import org.w3c.dom.Node; public class Main { public static int parseInt(Node node) { Objects.requireNonNull(node); if (!node.getNodeName().equalsIgnoreCase("int")) { throw new IllegalArgumentException("Node is not int: " + node); }// w w w. jav a 2 s .c om return Integer.parseInt(node.getTextContent()); } }