Android XML InputStream Parse getPullParser(InputStream in, String encoding)

Here you can find the source of getPullParser(InputStream in, String encoding)

Description

get Pull Parser

License

Apache License

Declaration

public static XmlPullParser getPullParser(InputStream in,
            String encoding) throws XmlPullParserException 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.io.InputStream;

import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlPullParserFactory;

public class Main {
    public static XmlPullParser getPullParser(InputStream in,
            String encoding) throws XmlPullParserException {
        XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
        factory.setNamespaceAware(true);
        XmlPullParser pullParser = null;
        pullParser = factory.newPullParser();
        pullParser.setInput(in, encoding);
        return pullParser;
    }/* w ww.  j  ava  2 s.co  m*/
}

Related

  1. readSetXml(InputStream in)
  2. readSetXml(InputStream in)
  3. InputStreamToDocument(InputStream istr)
  4. LoadXml(InputStream stream)
  5. getDocument(InputStream is)
  6. newPullParser(InputStream input)
  7. obtainEncodingStringFromInputStream(InputStream bis)
  8. parse(InputStream in, ContentHandler handler)
  9. parse(InputStream is)