Here you can find the source of getAttributeIntArray(final Node node, final String attribname)
public static int[] getAttributeIntArray(final Node node, final String attribname)
//package com.java2s; //License from project: Apache License import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; public class Main { public static int[] getAttributeIntArray(final Node node, final String attribname) { final String attr = getAttributeValue(node, attribname); if (attr != null) { String[] splits = attr.split("[,\\s]"); int[] result = new int[splits.length]; for (int i = 0; i < splits.length; i++) { result[i] = Integer.valueOf(splits[i]); }/*from w w w . j ava2 s . co m*/ return result; } return null; } public static String getAttributeValue(final Node node, final String attribname) { final NamedNodeMap attributes = node.getAttributes(); String att = null; if (attributes != null) { final Node attribute = attributes.getNamedItem(attribname); if (attribute != null) { att = attribute.getNodeValue(); } } return att; } }