public static Document toDocument ( File file ) throws SAXException , IOException { InputStream in = new BufferedInputStream ( new FileInputStream ( file ) ) ; try { return XmlUtils . toDocument ( in ) ; } finally { in . close ( ) ; } }
Parses an XML document from a file .