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 () {
    // XXX e.getTextContent() doesn't exsist under Android (Lukasz Wisniewski) 
    // / getTextContent() is now available in at least Android 2.2 if not earlier, so we'll keep using that 
    // return e.hasChildNodes() ? e.getFirstChild().getNodeValue() : null; 
    return e.getTextContent();
  } 
 
  /** 
   * Checks if this element has a child element with the given name. 
   *