@Override public void setFeature(String name, boolean value) throws XmlPullParserException { throw new XmlPullParserException(E_NOT_SUPPORTED); }
/** * Returns whether the current event is an end tag. * * @param xpp The {@link XmlPullParser} to query. * @return Whether the current event is an end tag. * @throws XmlPullParserException If an error occurs querying the parser. */ public static boolean isEndTag(XmlPullParser xpp) throws XmlPullParserException { return xpp.getEventType() == XmlPullParser.END_TAG; }
protected static String parseString(XmlPullParser xpp, String name, String defaultValue) { String value = xpp.getAttributeValue(null, name); return value == null ? defaultValue : value; }
public static void writeStringAttribute(XmlSerializer out, String name, String value) throws IOException { if (value != null) { out.attribute(null, name, value); } }
/** * Returns whether the current event is a start tag. * * @param xpp The {@link XmlPullParser} to query. * @return Whether the current event is a start tag. * @throws XmlPullParserException If an error occurs querying the parser. */ public static boolean isStartTag(XmlPullParser xpp) throws XmlPullParserException { return xpp.getEventType() == XmlPullParser.START_TAG; }
@Override public void defineEntityReplacementText(String entityName, String replacementText) throws XmlPullParserException { throw new XmlPullParserException(E_NOT_SUPPORTED); }
@Override protected void serializeExtraXmlAttrs(XmlSerializer serializer, ResResource res) throws IOException { if (ResXmlEncoders.hasMultipleNonPositionalSubstitutions(mRawValue)) { serializer.attribute(null, "formatted", "false"); } }
@Override public void setProperty(String name, Object value) throws XmlPullParserException { throw new XmlPullParserException(E_NOT_SUPPORTED); }
@Override public void setInput(Reader reader) throws XmlPullParserException { throw new XmlPullParserException(E_NOT_SUPPORTED); }
@Override public void setProperty(String name, Object value) throws XmlPullParserException { throw new XmlPullParserException("setProperty() not supported"); }
@Override public void defineEntityReplacementText( String entityName, String replacementText) throws XmlPullParserException { throw new XmlPullParserException( "defineEntityReplacementText() not supported"); }
@Override public String getNamespacePrefix(int pos) throws XmlPullParserException { throw new XmlPullParserException( "getNamespacePrefix() not supported"); }
@Override public int getNamespaceCount(int depth) throws XmlPullParserException { throw new XmlPullParserException( "getNamespaceCount() not supported"); }
@Override public void setInput(InputStream inputStream, String inputEncoding) throws XmlPullParserException { throw new XmlPullParserException("setInput() not supported"); }
@Override public String getNamespaceUri(int pos) throws XmlPullParserException { throw new XmlPullParserException( "getNamespaceUri() not supported"); }
@Override public void setInput(Reader in) throws XmlPullParserException { throw new XmlPullParserException("setInput() not supported"); }
@Override public int nextTag() throws XmlPullParserException, IOException { int eventType = next(); if (eventType == TEXT && isWhitespace()) { eventType = next(); } if (eventType != START_TAG && eventType != END_TAG) { throw new XmlPullParserException("Expected start or end tag.", this, null); } return eventType; }