/** * @param file * @return * @throws XMLParserException */ public static OMElement fileToOM(File file) throws XMLParserException { try { String xml = Io.getStringFromInputStream(new FileInputStream(file)); OMElement rootNode = XMLParser.stringToOM(xml); return rootNode; } catch (IOException ex) { throw new XMLParserException(ex.getMessage()); } }
/** * @param fileName * @return * @throws XMLParserException */ public static OMElement fileToOM(String fileName) throws XMLParserException { File file = new File(fileName); return XMLParser.fileToOM(file); }