Code example for Element

Methods: getAttribute, getTagName, hasAttribute

0
		 
		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);
				} 
			} 
		} 
		 
		return result;
	} 
	 
	/** 
	 * Return the text content of the first matched tag. 
	 * Short cut for "xml.child(tag).text()" 
	 * 
	 * Return null if there's no matched tag.