(InputStream stream)
| 420 | } |
| 421 | |
| 422 | public static Document readXml(InputStream stream) throws SAXException, IOException, ParserConfigurationException { |
| 423 | DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); |
| 424 | dbf.setIgnoringComments(true); |
| 425 | dbf.setIgnoringElementContentWhitespace(true); |
| 426 | |
| 427 | DocumentBuilder db = null; |
| 428 | db = dbf.newDocumentBuilder(); |
| 429 | db.setEntityResolver(new NullResolver()); |
| 430 | |
| 431 | return db.parse(stream); |
| 432 | } |
| 433 | |
| 434 | } |
| 435 |