Java XML Node Parse parseInt(Node node)

Here you can find the source of parseInt(Node node)

Description

parse Int

License

Open Source License

Declaration

public static int parseInt(Node node) 

Method Source Code

//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());
    }
}

Related

  1. parseArray(final Node array)
  2. parseDictionary(final Node dictionary)
  3. parseIntervals(Node intervals)
  4. parseList(Node node)
  5. parseModule(Node module, PrintWriter out)
  6. parseOptionNode(Node node)