private String getText(XmlPullParser xpp) throws XmlPullParserException {
    if (xpp.getEventType() == XmlPullParser.TEXT) {
      return xpp.getText();
    }
    return null;
  }
private String getText ( XmlPullParser xpp ) throws XmlPullParserException { if ( xpp . getEventType ( ) == XmlPullParser . TEXT ) { return xpp . getText ( ) ; } return null ; }
Returns text of given XML element.

@throws XmlPullParserException upon parsing response xml