Code example for Node

Methods: getNodeType

0
		return result;
	} 
	 
	private static XmlDom convert(Node node, String tag, String attr, String value){
		 
		if(node.getNodeType() != Node.ELEMENT_NODE){
			return null; 
		} 
		 
		Element e = (Element) node;
		 
		XmlDom result = null;
		 
		if(tag == null || tag.equals(e.getTagName())){		
			if(attr == null || e.hasAttribute(attr)){			
				if(value == null || value.equals(e.getAttribute(attr))){
					result = new XmlDom(e);
				} 
			} 
		} 
Experience pair programming with AI  Get Codota for Java