wx.xml.XmlDoctype¶
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
XMLit is valid forSMGL.
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.
Added in version 4.1/wxWidgets-3.1.0.
See also
Class Hierarchy¶
Methods Summary¶
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 |
Properties Summary¶
See |
|
See |
|
See |
|
See |
Class API¶
- class wx.xml.XmlDoctype(object)¶
Possible constructors:
XmlDoctype(rootName="", systemId="", publicId="") -> None
Represents a
DOCTYPEDeclaration.
Methods¶
- __init__(self, rootName='', systemId='', publicId='')¶
Creates and possible initializes the
DOCTYPE.- Parameters:
rootName (string) – The root name.
systemId (string) – The system identifier.
publicId (string) – The public identifier.
- Return type:
None
- Clear(self)¶
Removes all the
DOCTYPEvalues.- Return type:
None
- GetFullString(self)¶
Returns the formatted
DOCTYPEcontents.This consists of all the text shown between the opening “<!``DOCTYPE`` “ and closing “>” of a
DOCTYPEdeclaration.If this object is empty or invalid, i.e.
IsValidreturnsFalse, this method returns an empty string.- Return type:
str
- GetPublicId(self)¶
Returns the public id of the document.
- Return type:
str
- GetRootName(self)¶
Returns the root name of the document.
- Return type:
str
- GetSystemId(self)¶
Returns the system id of the document.
- Return type:
str
- IsValid(self)¶
Returns
Trueif the contents can produce a validDOCTYPEstring.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).
- Return type:
bool
Properties¶
- FullString¶
See
GetFullString
- PublicId¶
See
GetPublicId
- RootName¶
See
GetRootName
- SystemId¶
See
GetSystemId