PyDocs

Structured Markup Processing Tools

xml.dom

W3C Document Object Model implementation for Python.

The Python mapping of the Document Object Model is documented in the
Python Library Reference in the section on the xml.dom package.

This package contains the following modules:

minidom -- A simple implementation of the Level 1 DOM with namespace
           support added (based on the Level 2 specification) and other
           minor Level 2 functionality.

pulldom -- DOM builder supporting on-demand tree-building for selected
           subtrees of the document.
Symbols in xml.dom

a

Attr
Attr inherits from Node, so inherits all its attributes.

c

CDATASection
The Text interface represents text in the XML document.
CharacterData
CharacterData represents text-like data in the XML document.
Comment
Comment represents a comment in the XML document.

d

Document
A Document represents an entire XML document, including its constituent elements, attributes, processing instructions, comments etc.
DocumentFragment
DocumentFragment is a lightweight container of nodes.
DocumentType
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.
DOMException
Abstract base class for DOM exceptions.
DOMImplementation
The DOMImplementation interface provides a way for applications to determine the availability of particular features in the DOM they are using.
DOMSTRING_SIZE_ERR
DomstringSizeErr
DomstringSizeErr
Raised when a specified range of text does not fit into a string.

e

Element
Element is a subclass of Node, so inherits all the attributes of that class.
EMPTY_NAMESPACE
The value used to indicate that no namespace is associated with a node in the DOM.
Entity
Entity represents a parsed or unparsed entity declared in the DTD.

g

getDOMImplementation
Return a suitable DOM implementation.

h

HIERARCHY_REQUEST_ERR
HierarchyRequestErr
HierarchyRequestErr
Raised when an attempt is made to insert a node where the node type is not allowed.

i

INDEX_SIZE_ERR
IndexSizeErr
IndexSizeErr
Raised when an index or size parameter to a method is negative or exceeds the allowed values.
INUSE_ATTRIBUTE_ERR
InuseAttributeErr
InuseAttributeErr
Raised when an attempt is made to insert an Attr node that is already present elsewhere in the document.
INVALID_ACCESS_ERR
InvalidAccessErr
INVALID_CHARACTER_ERR
InvalidCharacterErr
INVALID_MODIFICATION_ERR
InvalidModificationErr
INVALID_STATE_ERR
InvalidStateErr
InvalidAccessErr
Raised if a parameter or an operation is not supported on the underlying object.
InvalidCharacterErr
This exception is raised when a string parameter contains a character that is not permitted in the context it’s being used in by the XML 1.0 recommendation.
InvalidModificationErr
Raised when an attempt is made to modify the type of a node.
InvalidStateErr
Raised when an attempt is made to use an object that is not defined or is no longer usable.

n

NamedNodeMap
NamedNodeMap does not inherit from Node.
NAMESPACE_ERR
NamespaceErr
NamespaceErr
If an attempt is made to change any object in a way that is not permitted with regard to the Namespaces in XML recommendation, this exception is raised.
NO_DATA_ALLOWED_ERR
NoDataAllowedErr
NO_MODIFICATION_ALLOWED_ERR
NoModificationAllowedErr
NoDataAllowedErr
This is raised if data is specified for a node which does not support data.
Node
Class giving the NodeType constants.
NodeList
A NodeList represents a sequence of nodes.
NoModificationAllowedErr
Raised on attempts to modify an object where modifications are not allowed (such as for read-only nodes).
NOT_FOUND_ERR
NotFoundErr
NOT_SUPPORTED_ERR
NotSupportedErr
Notation
Notation represents a notation declared in the DTD.
NotFoundErr
Exception when a node does not exist in the referenced context.
NotSupportedErr
Raised when the implementation does not support the requested type of object or operation.

p

ProcessingInstruction
Represents a processing instruction in the XML document; this inherits from the Node interface and cannot have child nodes.

r

registerDOMImplementation
Register the factory function with the name.

s

SYNTAX_ERR
SyntaxErr
SyntaxErr
Raised when an invalid or illegal string is specified.

t

Text
The Text interface represents text in the XML document.

v

VALIDATION_ERR
ValidationErr
ValidationErr
Raised when an operation would make the document invalid with respect to partial validity.

w

WRONG_DOCUMENT_ERR
WrongDocumentErr
WrongDocumentErr
Raised when a node is inserted in a different document than it currently belongs to, and the implementation does not support migrating the node from one document to the other.

x

XHTML_NAMESPACE
The URI of the XHTML namespace as defined by XHTML 1.0: The Extensible HyperText Markup Language (section 3.1.1).
XML_NAMESPACE
The namespace URI associated with the reserved prefix xml, as defined by Namespaces in XML (section 4).
XMLNS_NAMESPACE
The namespace URI for namespace declarations, as defined by Document Object Model (DOM) Level 2 Core Specification (section 1.1.8).