Code example for XmlPullParserFactory

Methods: setNamespaceAware

0
  private static final Map<String, Integer> mInputTypes = new HashMap<String, Integer>();
 
  public static XmlPullParserFactory getFactory() throws XmlPullParserException {
    if (mFactory == null) {
      mFactory = XmlPullParserFactory.newInstance();
      mFactory.setNamespaceAware(true);
    } 
    return mFactory;
  } 
 
  public static XmlPullParser getXml() throws XmlPullParserException {
    return getFactory().newPullParser();
  } 
 
  public static XmlPullParser getXml(InputStream is) throws XmlPullParserException {
    XmlPullParser xml = getXml();
    xml.setInput(is, null);
    return xml;
  } 
 
  public static XmlPullParser getXml(Reader ir) throws XmlPullParserException {