The list of methods to do XML Parse Stream are organized into topic(s).
void
parse(DefaultHandler handler, InputStream in) Parse the XML data in the given input stream, using the specified handler object as both the content and error handler.
XMLReader xr = _pfactory.newSAXParser().getXMLReader();
xr.setContentHandler(handler);
xr.setErrorHandler(handler);
xr.parse(new InputSource(in));
Document
parse(final InputStream is) Grab the Document loaded from the specified InputStream
return getThreadedDocumentBuilder().parse(is);
Document
parse(InputStream anInputStream) parse
Document document;
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
try {
DocumentBuilder builder = factory.newDocumentBuilder();
document = builder.parse(anInputStream);
} catch (Exception e) {
throw new RuntimeException(e);
return document;
Document
parse(InputStream byteStream) Parses the input stream and returns a DOM Document .
DOMImplementationLS impl = (DOMImplementationLS) getDOMImplementation();
LSInput input = impl.createLSInput();
input.setByteStream(byteStream);
LSParser builder = impl.createLSParser(DOMImplementationLS.MODE_SYNCHRONOUS, null);
DOMConfiguration config = builder.getDomConfig();
config.setParameter("comments", false);
config.setParameter("element-content-whitespace", false);
return builder.parse(input);
...
Document
parse(InputStream in) parse
try {
DocumentBuilder db = DocumentBuilderFactory.newInstance().newDocumentBuilder();
return db.parse(in);
} catch (Exception x) {
throw new RuntimeException("Error parsing XML string.", x);
Document
parse(InputStream in) parse
DocumentBuilder d = getDocumentBuilder();
try {
Document doc = d.parse(in);
doc.normalize();
return doc;
} catch (SAXException e) {
throw new RuntimeException("Bad xml-code: " + e.toString());
} catch (IOException f) {
...