use of org.apache.harmony.xml.ExpatReader in project android_frameworks_base by ParanoidAndroid.
the class Xml method parse.
/**
* Parses the given xml string and fires events on the given SAX handler.
*/
public static void parse(String xml, ContentHandler contentHandler) throws SAXException {
try {
XMLReader reader = new ExpatReader();
reader.setContentHandler(contentHandler);
reader.parse(new InputSource(new StringReader(xml)));
} catch (IOException e) {
throw new AssertionError(e);
}
}
use of org.apache.harmony.xml.ExpatReader in project android_frameworks_base by ResurrectionRemix.
the class Xml method parse.
/**
* Parses xml from the given input stream and fires events on the given SAX
* handler.
*/
public static void parse(InputStream in, Encoding encoding, ContentHandler contentHandler) throws IOException, SAXException {
XMLReader reader = new ExpatReader();
reader.setContentHandler(contentHandler);
InputSource source = new InputSource(in);
source.setEncoding(encoding.expatName);
reader.parse(source);
}
use of org.apache.harmony.xml.ExpatReader in project android_frameworks_base by DirtyUnicorns.
the class Xml method parse.
/**
* Parses xml from the given reader and fires events on the given SAX
* handler.
*/
public static void parse(Reader in, ContentHandler contentHandler) throws IOException, SAXException {
XMLReader reader = new ExpatReader();
reader.setContentHandler(contentHandler);
reader.parse(new InputSource(in));
}
use of org.apache.harmony.xml.ExpatReader in project android_frameworks_base by DirtyUnicorns.
the class Xml method parse.
/**
* Parses the given xml string and fires events on the given SAX handler.
*/
public static void parse(String xml, ContentHandler contentHandler) throws SAXException {
try {
XMLReader reader = new ExpatReader();
reader.setContentHandler(contentHandler);
reader.parse(new InputSource(new StringReader(xml)));
} catch (IOException e) {
throw new AssertionError(e);
}
}
use of org.apache.harmony.xml.ExpatReader in project android_frameworks_base by AOSPA.
the class Xml method parse.
/**
* Parses xml from the given input stream and fires events on the given SAX
* handler.
*/
public static void parse(InputStream in, Encoding encoding, ContentHandler contentHandler) throws IOException, SAXException {
XMLReader reader = new ExpatReader();
reader.setContentHandler(contentHandler);
InputSource source = new InputSource(in);
source.setEncoding(encoding.expatName);
reader.parse(source);
}
Aggregations