Code example for XmlPullParser

Methods: getDepth

0
   * element has been returned, 1 after that, etc. 
   * 
   * @return the depth of the current element 
   */ 
  public int getDepth() { 
    return mParser.getDepth();
  } 
 
  /** 
   * Consumes the rest of the children, accumulating any text at this level into the builder. 
   * 
   * @param textBuffer 
   * @throws IOException propogated from the XmlPullParser 
   * @throws ParseException if there was an error parsing the xml. 
   */ 
  public void readRemainingText(int parentDepth, StringBuffer textBuffer)
      throws IOException, ParseException { 
    while (nextTagOrText(parentDepth, textBuffer) != null) {
    } 
  }