.. wxPython Phoenix documentation This file was generated by Phoenix's sphinx generator and associated tools, do not edit by hand. Copyright: (c) 2011-2020 by Total Control Software License: wxWindows License .. include:: headings.inc .. _wx.richtext.RichTextXMLHandler: ========================================================================================================================================== |phoenix_title| **wx.richtext.RichTextXMLHandler** ========================================================================================================================================== A handler for loading and saving content in an ``XML`` format specific to :ref:`wx.richtext.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. |phoenix_title| Handler flags ============================= The following flags can be used with this handler, via the handler's :meth:`~wx.richtext.RichTextFileHandler.SetFlags` function or the buffer or control's SetHandlerFlags() function: - ``wx.richtext.RICHTEXT_HANDLER_INCLUDE_STYLESHEET`` Include the style sheet in loading and saving operations. | |class_hierarchy| Class Hierarchy ================================= .. raw:: html
Inheritance diagram for class RichTextXMLHandler:
| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~wx.richtext.RichTextXMLHandler.__init__` Constructor. :meth:`~wx.richtext.RichTextXMLHandler.CanLoad` Returns ``True``. :meth:`~wx.richtext.RichTextXMLHandler.CanSave` Returns ``True``. :meth:`~wx.richtext.RichTextXMLHandler.ClearNodeToClassMap` Cleans up the mapping between node name and C++ class. :meth:`~wx.richtext.RichTextXMLHandler.ExportXML` Recursively exports an object to the stream. :meth:`~wx.richtext.RichTextXMLHandler.ImportXML` Recursively imports an object. :meth:`~wx.richtext.RichTextXMLHandler.RegisterNodeName` Call with ``XML`` node name, C++ class name so that ``RTC`` can read in the node. ================================================================================ ================================================================================ | |api| Class API =============== .. class:: wx.richtext.RichTextXMLHandler(RichTextFileHandler) **Possible constructors**:: RichTextXMLHandler(name="XML", ext="xml", type=RICHTEXT_TYPE_XML) A handler for loading and saving content in an ``XML`` format specific to RichTextBuffer. .. method:: __init__(self, name="XML", ext="xml", type=RICHTEXT_TYPE_XML) Constructor. :param `name`: :type `name`: string :param `ext`: :type `ext`: string :param `type`: :type `type`: int .. method:: CanLoad(self) Returns ``True``. :rtype: `bool` .. method:: CanSave(self) Returns ``True``. :rtype: `bool` .. staticmethod:: ClearNodeToClassMap() Cleans up the mapping between node name and C++ class. .. method:: ExportXML(self, stream, obj, level) Recursively exports an object to the stream. :param `stream`: :type `stream`: wx.OutputStream :param `obj`: :type `obj`: wx.richtext.RichTextObject :param `level`: :type `level`: int :rtype: `bool` .. method:: ImportXML(self, buffer, obj, node) Recursively imports an object. :param `buffer`: :type `buffer`: wx.richtext.RichTextBuffer :param `obj`: :type `obj`: wx.richtext.RichTextObject :param `node`: :type `node`: wx.xml.XmlNode :rtype: `bool` .. staticmethod:: RegisterNodeName(nodeName, className) Call with ``XML`` node name, C++ class name so that ``RTC`` can read in the node. If you add a custom object, call this. :param `nodeName`: :type `nodeName`: string :param `className`: :type `className`: string