use of org.freeplane.n3.nanoxml.CdataContentXmlWriter in project freeplane by freeplane.
the class AddOnProperties method toXmlString.
public String toXmlString() {
try {
final String header = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
final StringWriter writer = new StringWriter();
final CdataContentXmlWriter xmlWriter = new CdataContentXmlWriter(writer);
xmlWriter.addRawContent(header);
xmlWriter.addRawContent(System.getProperty("line.separator"));
xmlWriter.write(toXml(), true);
return writer.toString();
} catch (IOException e) {
// StringWriter does not throw an exception but anyhow...
throw new RuntimeException(e);
}
}
Aggregations