Exemplo n.º 1
0
 /**
  * @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());
   }
 }
Exemplo n.º 2
0
 /**
  * @param fileName
  * @return
  * @throws XMLParserException
  */
 public static OMElement fileToOM(String fileName) throws XMLParserException {
   File file = new File(fileName);
   return XMLParser.fileToOM(file);
 }