Exemplo n.º 1
0
 /**
  * get the document node of a topic file.
  *
  * @param absolutePathToFile topic file
  * @return element.
  */
 private Element getTopicDoc(final String absolutePathToFile) {
   final DocumentBuilder builder = getDocumentBuilder();
   try {
     final Document doc = builder.parse(absolutePathToFile);
     return doc.getDocumentElement();
   } catch (final SAXException e) {
     e.printStackTrace();
   } catch (final IOException e) {
     e.printStackTrace();
   }
   return null;
 }
Exemplo n.º 2
0
 @Override
 public void write(final File filename) throws DITAOTException {
   // pass map's directory path
   filePath = filename;
   try {
     output = new StringWriter();
     processChunk(rootTopicref, null);
     if (!copyto.isEmpty()) {
       updateList();
     }
   } finally {
     if (output != null) {
       try {
         output.close();
       } catch (final IOException e) {
         logger.error(e.getMessage(), e);
       }
     }
   }
 }