A handler for loading and saving content in an XML format specific to RichTextBuffer. You can either add the handler to the buffer and load and save through the buffer or control API, or you can create an instance of the handler on the stack and call its functions directly.
The following flags can be used with this handler, via the handler’s SetFlags function or the buffer or control’s SetHandlerFlags function:
RICHTEXT_HANDLER_INCLUDE_STYLESHEET |
Include the style sheet in loading and saving operations. |
RichTextXMLHandler.new(String name = T("XML"), String ext = T("xml"),
Integer type = RICHTEXT_TYPE_XML)
Constructor.
Boolean can_load()
Returns .
Boolean can_save()
Returns .
String create_style(RichTextAttr attr,
Boolean isPara = false)
Creates XML code for a given character or paragraph style.
Boolean do_load_file(RichTextBuffer buffer,
InputStream stream)
Loads buffer context from the given stream.
Boolean do_save_file(RichTextBuffer buffer,
OutputStream stream)
Saves buffer context to the given stream.
Boolean export_xml(OutputStream stream,
MBConv convMem,
MBConv convFile,
RichTextObject obj,
Integer level)
Recursively exports an object to the stream.
String get_node_content(XmlNode node)
Helper function: gets node context.
XmlNode get_param_node(XmlNode node,
String param)
Helper function: gets a named parameter from the XML node.
String get_param_value(XmlNode node, String param)
Helper function: gets a named parameter from the XML node.
Boolean get_style(TextAttrEx attr,
XmlNode node,
Boolean isPara = false)
Helper function: gets style parameters from the given XML node.
String get_text(XmlNode node, String param = '',
Boolean translate = false)
Helper function: gets text from the node.
Boolean has_param(XmlNode node, String param)
Helper function: returns if the node has the given parameter.
Boolean import_xml(RichTextBuffer buffer,
XmlNode node)
Recursively imports an object.
[This page automatically generated from the Textile source at Wed Sep 09 02:21:22 +0100 2009]