/* * @see org.primordion.xholon.io.xml.XmlWriter#writeStartDocument() */ public void writeStartDocument() { /*try { ctdWriter.writeStartDocument(); ctdWriter.writeStartElement("cherrytree"); } catch (XMLStreamException e) { e.printStackTrace(); }*/ super.writeStartDocument(); super.writeStartElement("cherrytree"); }
/* * @see org.primordion.xholon.io.xml.XmlWriter#writeEndElement(String name) */ public void writeEndElement(String name) { if ("Annotation".equals(name)) { return; } // try { if (richText.length() > 0) { super.writeStartElement("rich_text"); super.writeText(richText); super.writeEndElement("rich_text"); // rich_text richText = ""; } super.writeEndElement("node"); // node // } catch (XMLStreamException e) { // e.printStackTrace(); // } }
/* * @see org.primordion.xholon.io.xml.XmlWriter#writeComment(java.lang.String) */ public void writeComment(String data) { /*try { ctdWriter.writeComment(data); } catch (XMLStreamException e) { e.printStackTrace(); }*/ super.writeComment(data); }
/* * @see org.primordion.xholon.io.xml.XmlWriter#writeAttribute(java.lang.String, java.lang.String) */ public void writeAttribute(String name, String value) { if ("prog_lang".equals(name)) { // try { super.writeAttribute(name, value); // } catch (XMLStreamException e) { // e.printStackTrace(); // } } else { // Cherry Tree ignores attributes, so turn them into rich_text text saveRichText(name + ": " + value); } }
/* * @see org.primordion.xholon.io.xml.XmlWriter#writeStartElement(java.lang.String, java.lang.String, java.lang.String) */ public void writeStartElement(String prefix, String localName, String namespaceURI) { super.writeStartElement(prefix, localName, namespaceURI); }