+ /**
+ * Load the XML File
+ *
+ * @param file
+ * The XML file
+ * @return The document representing the XML file
+ * @throws ParserConfigurationException
+ * if a DocumentBuilder cannot be created
+ * @throws SAXException
+ * If any parse errors occur.
+ * @throws IOException
+ * If any IO errors occur.
+ * @since 2.0
+ */
+ public static Document getDocumentFromFile(File file) throws ParserConfigurationException, SAXException, IOException {
+ DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
+ Document doc = dbFactory.newDocumentBuilder().parse(file);
+ doc.getDocumentElement().normalize();
+ return doc;
+ }
+