public static void writeXmlFile(Document doc, String filename) {
try {
// Prepare the DOM document for writing
Source source = new DOMSource(doc);
// Prepare the output file
File file = new File(filename);
Result result = new StreamResult(file);
// Write the DOM document to the file
Transformer xformer = TransformerFactory.newInstance()
.newTransformer();
xformer.transform(source, result);
} catch (TransformerConfigurationException e) {
} catch (TransformerException e) {
}
}
i am using this function to write xml into a file, everything comes fine but one line is being added as follows just before last ending tag.
[Mar 13 15:40:16] INFO (ConnectionController.java:342) -
i am neer using this class and why is this mar 13 date even i dont know
is it a common issue ?