Represents a DOCTYPE
Declaration.
Example DOCTYPE
: <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
.
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.
New in version 4.1/wxWidgets-3.1.0.
See also
Creates and possible initializes the |
|
Removes all the |
|
Returns the formatted |
|
Returns the public id of the document. |
|
Returns the root name of the document. |
|
Returns the system id of the document. |
|
Returns |
See |
|
See |
|
See |
|
See |
wx.xml.
XmlDoctype
(object)¶Possible constructors:
XmlDoctype(rootName="", systemId="", publicId="")
Represents a DOCTYPE
Declaration.
__init__
(self, rootName="", systemId="", publicId="")¶Creates and possible initializes the DOCTYPE
.
rootName (string) – The root name.
systemId (string) – The system identifier.
publicId (string) – The public identifier.
Clear
(self)¶Removes all the DOCTYPE
values.
GetFullString
(self)¶Returns the formatted DOCTYPE
contents.
This consists of all the text shown between the opening “<!``DOCTYPE`` “ and closing “>” of a DOCTYPE
declaration.
If this object is empty or invalid, i.e. IsValid
returns False
, this method returns an empty string.
string
GetPublicId
(self)¶Returns the public id of the document.
string
GetRootName
(self)¶Returns the root name of the document.
string
GetSystemId
(self)¶Returns the system id of the document.
string
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).
bool
FullString
¶See GetFullString
PublicId
¶See GetPublicId
RootName
¶See GetRootName
SystemId
¶See GetSystemId