Here you can find the source of searchDialogByName(NodeList nodeList, String id)
public static Node searchDialogByName(NodeList nodeList, String id)
//package com.java2s; //License from project: Open Source License import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; import org.w3c.dom.NodeList; public class Main { public static Node searchDialogByName(NodeList nodeList, String id) { for (int i = 0; i < nodeList.getLength(); i++) { Node node = nodeList.item(i); String idd = getNodeAttributeValue(node, "id"); if (id.equals(idd)) return node; }/*from w w w .ja va 2 s. c om*/ return null; } public static String getNodeAttributeValue(Node node, String attributeName) { NamedNodeMap attributes = node.getAttributes(); if (attributes == null) return null; Node attributeValue = attributes.getNamedItem(attributeName); return attributeValue == null ? null : attributeValue.getNodeValue(); } }