Info Node: (python2.1-lib.info)DocumentType Objects
(python2.1-lib.info)DocumentType Objects
DocumentType Objects
....................
Information about the notations and entities declared by a document
(including the external subset if the parser uses it and can provide
the information) is available from a `DocumentType' object. The
`DocumentType' for a document is available from the `Document' object's
`doctype' attribute.
`DocumentType' is a specialization of `Node', and adds the following
attributes:
`publicId'
The public identifier for the external subset of the document type
definition. This will be a string or `None'.
`systemId'
The system identifier for the external subset of the document type
definition. This will be a URI as a string, or `None'.
`internalSubset'
A string giving the complete internal subset from the document.
This does not include the brackets which enclose the subset. If
the document has no internal subset, this should be `None'.
`name'
The name of the root element as given in the `DOCTYPE'
declaration, if present. If the was no `DOCTYPE' declaration,
this will be `None'.
`entities'
This is a `NamedNodeMap' giving the definitions of external
entities. For entity names defined more than once, only the first
definition is provided (others are ignored as required by the XML
recommendation). This may be `None' if the information is not
provided by the parser, or if no entities are defined.
`notations'
This is a `NamedNodeMap' giving the definitions of notations. For
notation names defined more than once, only the first definition
is provided (others are ignored as required by the XML
recommendation). This may be `None' if the information is not
provided by the parser, or if no notations are defined.