Exemplo n.º 1
0
 /**
  * write dom-object to disc
  *
  * @param document
  * @throws TransformerException
  */
 public void write(Document document) throws TransformerException {
   DOMSource source = new DOMSource(document);
   StreamResult streamResult = new StreamResult(xmlFile.getAbsolutePath());
   transformer.transform(source, streamResult);
 }
Exemplo n.º 2
0
 String getFileName() {
   return xmlFile.getAbsolutePath().toString();
 }
Exemplo n.º 3
0
 /**
  * build new Document
  *
  * @return document
  * @throws ParserConfigurationException
  * @throws SAXException
  * @throws IOException
  */
 Document buildDocument() throws ParserConfigurationException, SAXException, IOException {
   DocumentBuilder db = xmlMethFac.newDocumentBuilder();
   Document document = db.parse(xmlFile.getAbsolutePath());
   return document;
 }