Here you can find the source of getFirstExtensionNode(Node extensionsNode)
Parameter | Description |
---|---|
extensionsNode | extension node |
private static Node getFirstExtensionNode(Node extensionsNode)
//package com.java2s; //License from project: Apache License import org.w3c.dom.Node; import org.w3c.dom.NodeList; public class Main { /**/*ww w . jav a2 s. c o m*/ * Returns first extension node * * @param extensionsNode * extension node */ private static Node getFirstExtensionNode(Node extensionsNode) { final String extensionTag = "extension"; NodeList nodes = extensionsNode.getChildNodes(); for (int i = 0; i < nodes.getLength(); i++) { Node child = nodes.item(i); if (extensionTag.equals(child.getNodeName())) return child; } return null; } }