DOMParserFactory dpf = new DOMParserFactory();
// Create a new document, where the actual content starts at the root element, which is the inner part of requestDoc
Document contentDocument = dpf.getDocument();
contentDocument.appendChild(
(Element) dpf.cloneNode(contentDocument, contentNode, true));
new DOMWriter(new FileOutputStream(tempFile)).printWithoutFormatting(
contentDocument);
} catch (Exception e) {
getLogger().error(".act(): Exception during writing to temp file", e);
}