.. 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.xml.XmlDoctype: ========================================================================================================================================== |phoenix_title| **wx.xml.XmlDoctype** ========================================================================================================================================== Represents a ``DOCTYPE`` Declaration. Example ``DOCTYPE``: ```` . In the above example, "plist" is the name of root element, "-//Apple//DTD ``PLIST`` 1.0//EN" (without the quotes) is the public identifier and "http://www.apple.com/DTDs/PropertyList-1.0.dtd" (again, without the quotes) is the system identifier. A valid ``DOCTYPE`` exists in one of following forms: - A root element name. - A root element name and a system identifier. - A root element name, a system identifier and a public identifier. - A root element name and a public identifier. Although this form is not valid ``XML`` it is valid for ``SMGL``. The ``DOCTYPE`` may also contain an internal subset of declarations added between square brackets at the end. These have not been implemented at this time. .. versionadded:: 4.1/wxWidgets-3.1.0 .. seealso:: :ref:`wx.xml.XmlDocument` | |class_hierarchy| Class Hierarchy ================================= .. raw:: html
Inheritance diagram for class XmlDoctype:
| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~wx.xml.XmlDoctype.__init__` Creates and possible initializes the ``DOCTYPE``. :meth:`~wx.xml.XmlDoctype.Clear` Removes all the ``DOCTYPE`` values. :meth:`~wx.xml.XmlDoctype.GetFullString` Returns the formatted ``DOCTYPE`` contents. :meth:`~wx.xml.XmlDoctype.GetPublicId` Returns the public id of the document. :meth:`~wx.xml.XmlDoctype.GetRootName` Returns the root name of the document. :meth:`~wx.xml.XmlDoctype.GetSystemId` Returns the system id of the document. :meth:`~wx.xml.XmlDoctype.IsValid` Returns ``True`` if the contents can produce a valid ``DOCTYPE`` string. ================================================================================ ================================================================================ | |property_summary| Properties Summary ===================================== ================================================================================ ================================================================================ :attr:`~wx.xml.XmlDoctype.FullString` See :meth:`~wx.xml.XmlDoctype.GetFullString` :attr:`~wx.xml.XmlDoctype.PublicId` See :meth:`~wx.xml.XmlDoctype.GetPublicId` :attr:`~wx.xml.XmlDoctype.RootName` See :meth:`~wx.xml.XmlDoctype.GetRootName` :attr:`~wx.xml.XmlDoctype.SystemId` See :meth:`~wx.xml.XmlDoctype.GetSystemId` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: wx.xml.XmlDoctype(object) **Possible constructors**:: XmlDoctype(rootName="", systemId="", publicId="") Represents a ``DOCTYPE`` Declaration. .. method:: __init__(self, rootName="", systemId="", publicId="") Creates and possible initializes the ``DOCTYPE``. :param `rootName`: The root name. :type `rootName`: string :param `systemId`: The system identifier. :type `systemId`: string :param `publicId`: The public identifier. :type `publicId`: string .. method:: Clear(self) Removes all the ``DOCTYPE`` values. .. method:: GetFullString(self) Returns the formatted ``DOCTYPE`` contents. This consists of all the text shown between the opening "" of a ``DOCTYPE`` declaration. If this object is empty or invalid, i.e. :meth:`IsValid` returns ``False``, this method returns an empty string. :rtype: `string` .. method:: GetPublicId(self) Returns the public id of the document. :rtype: `string` .. method:: GetRootName(self) Returns the root name of the document. :rtype: `string` .. method:: GetSystemId(self) Returns the system id of the document. :rtype: `string` .. method:: IsValid(self) Returns ``True`` if the contents can produce a valid ``DOCTYPE`` string. For an object to be valid, it must have a non-empty root name and a valid system identifier (currently the validity checks of the latter are limited to checking that it doesn't contain both single and float quotes). :rtype: `bool` .. attribute:: FullString See :meth:`~wx.xml.XmlDoctype.GetFullString` .. attribute:: PublicId See :meth:`~wx.xml.XmlDoctype.GetPublicId` .. attribute:: RootName See :meth:`~wx.xml.XmlDoctype.GetRootName` .. attribute:: SystemId See :meth:`~wx.xml.XmlDoctype.GetSystemId`