List of utility methods to do XML Parse Stream
Node | parseXml(InputStream src) parse Xml if (src == null) { return null; return parseXml(new InputSource(src)); |
Document | parseXMLFromStream(InputStream stream) Parses XML from an input stream. Document document = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(stream);
stream.close();
return document;
|
Document | parseXmlInputStream(InputStream inputStream) parse Xml Input Stream Document document = null; try { document = getDocumentBuilder().parse(inputStream); inputStream.close(); } catch (IOException e) { throw new RuntimeException("could not read xml stream", e); } catch (SAXException e) { throw new RuntimeException("could not parse xml document", e); ... |
Document | parseXmlInputStream(InputStream inputStream) parse Xml Input Stream Document document = null; try { document = getDocumentBuilder().parse(inputStream); } catch (Exception e) { throw new RuntimeException("couldn't parse xml", e); return document; |
Document | parseXMLResource(final InputStream inputStream) Parses Input Stream and returns XML document. DocumentBuilder docBuilder;
Document doc = null;
DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
docBuilderFactory.setIgnoringElementContentWhitespace(true);
docBuilder = docBuilderFactory.newDocumentBuilder();
doc = docBuilder.parse(inputStream);
return doc;
|