public final class XmlPullParserUtil extends Object
XmlPullParser
utility methods.Modifier and Type | Method and Description |
---|---|
static String |
getAttributeValue(XmlPullParser xpp,
String attributeName)
Returns the value of an attribute of the current start tag.
|
static boolean |
isEndTag(XmlPullParser xpp)
Returns whether the current event is an end tag.
|
static boolean |
isEndTag(XmlPullParser xpp,
String name)
Returns whether the current event is an end tag with the specified name.
|
static boolean |
isStartTag(XmlPullParser xpp)
Returns whether the current event is a start tag.
|
static boolean |
isStartTag(XmlPullParser xpp,
String name)
Returns whether the current event is a start tag with the specified name.
|
public static boolean isEndTag(XmlPullParser xpp, String name) throws XmlPullParserException
xpp
- The XmlPullParser
to query.name
- The specified name.XmlPullParserException
- If an error occurs querying the parser.public static boolean isEndTag(XmlPullParser xpp) throws XmlPullParserException
xpp
- The XmlPullParser
to query.XmlPullParserException
- If an error occurs querying the parser.public static boolean isStartTag(XmlPullParser xpp, String name) throws XmlPullParserException
xpp
- The XmlPullParser
to query.name
- The specified name.XmlPullParserException
- If an error occurs querying the parser.public static boolean isStartTag(XmlPullParser xpp) throws XmlPullParserException
xpp
- The XmlPullParser
to query.XmlPullParserException
- If an error occurs querying the parser.public static String getAttributeValue(XmlPullParser xpp, String attributeName)
xpp
- The XmlPullParser
to query.attributeName
- The name of the attribute.