use of net.n3.nanoxml.XMLElement in project freeplane by freeplane.
the class TimeWindowColumnSetting method marschall.
void marschall(final XMLElement xml) {
final XMLElement child = new XMLElement("time_window_column_setting");
child.setAttribute("column_sorting", Integer.toString(columnSorting));
child.setAttribute("column_width", Integer.toString(columnWidth));
xml.addChild(child);
}
use of net.n3.nanoxml.XMLElement in project freeplane by freeplane.
the class NoteWriter method writeContent.
/*
* (non-Javadoc)
* @see freeplane.io.INodeWriter#saveContent(freeplane.io.ITreeWriter,
* java.lang.Object, java.lang.String)
*/
public void writeContent(final ITreeWriter writer, final Object element, final IExtension note) throws IOException {
RichTextModel note1 = (RichTextModel) note;
if (note1.getXml() != null) {
final XMLElement htmlElement = new XMLElement();
htmlElement.setName(NodeTextBuilder.XML_NODE_XHTML_CONTENT_TAG);
if (note instanceof NoteModel) {
htmlElement.setAttribute(NodeTextBuilder.XML_NODE_XHTML_TYPE_TAG, NodeTextBuilder.XML_NODE_XHTML_TYPE_NOTE);
} else {
htmlElement.setAttribute(NodeTextBuilder.XML_NODE_XHTML_TYPE_TAG, "UNKNOWN");
}
final String content = note1.getXml().replace('\0', ' ');
writer.addElement('\n' + content + '\n', htmlElement);
}
return;
}
use of net.n3.nanoxml.XMLElement in project freeplane by freeplane.
the class MapStyle method saveConditionalStyles.
private void saveConditionalStyles(ConditionalStyleModel conditionalStyleModel, XMLElement parent, boolean createRoot) {
final int styleCount = conditionalStyleModel.getStyleCount();
if (styleCount == 0) {
return;
}
final XMLElement conditionalStylesRoot;
if (createRoot) {
conditionalStylesRoot = parent.createElement("conditional_styles");
parent.addChild(conditionalStylesRoot);
} else
conditionalStylesRoot = parent;
for (final Item item : conditionalStyleModel) {
item.toXml(conditionalStylesRoot);
}
}
use of net.n3.nanoxml.XMLElement in project freeplane by freeplane.
the class ScriptAddOnProperties method toXml.
public XMLElement toXml() {
final XMLElement xmlElement = super.toXml();
addScriptsAsChild(xmlElement);
addLibAsChild(xmlElement);
return xmlElement;
}
use of net.n3.nanoxml.XMLElement in project freeplane by freeplane.
the class ScriptAddOnProperties method addLibAsChild.
private void addLibAsChild(XMLElement parent) {
final XMLElement xmlElement = new XMLElement("libs");
if (lib != null) {
for (String l : lib) {
final XMLElement libElement = new XMLElement("lib");
libElement.setAttribute("name", l);
xmlElement.addChild(libElement);
}
}
parent.addChild(xmlElement);
}
Aggregations