Code example for Element

Methods: getAttribute, hasAttribute

0
	 * 
	 * @param name The attribute's name 
	 * @return Attribute value or <code>null</code> 
	 */ 
	public String getAttribute(String name) {
		return e.hasAttribute(name) ? e.getAttribute(name) : null;
	} 
 
	/** 
	 * @return the text content of the element 
	 */ 
	public String getText() {
		return e.hasChildNodes() ? e.getFirstChild().getNodeValue() : null;
	} 
 
	/** 
	 * Checks if this element has a child element with the given name. 
	 * 
	 * @param name The child's name 
	 * @return <code>true</code> if this element has a child element with the given name 
	 */