Movatterモバイル変換


[0]ホーム

URL:


Previous PageUp One LevelNext PagePython Library ReferenceContentsModule IndexIndex
Previous:13.6 xml.domUp:13.6 xml.domNext:13.6.2 Objects in the

13.6.1 Module Contents

Thexml.dom contains the following functions:

registerDOMImplementation(name, factory)
Register thefactory function with the namename. Thefactory function should return an object which implements theDOMImplementation interface. The factory function can returnthe same object every time, or a new one for each call, as appropriatefor the specific implementation (e.g. if that implementation supportssome customization).

getDOMImplementation([name[, features]])
Return a suitable DOM implementation. Thename is eitherwell-known, the module name of a DOM implementation, orNone. If it is notNone, imports the correspondingmodule and returns aDOMImplementation object if the importsucceeds. If no name is given, and if the environment variablePYTHON_DOM is set, this variable is used to find theimplementation.

If name is not given, this examines the available implementations tofind one with the required feature set. If no implementation can befound, raise anImportError. The features list must be asequence of(feature,version) pairs which arepassed to thehasFeature() method on availableDOMImplementation objects.

Some convenience constants are also provided:

EMPTY_NAMESPACE
The value used to indicate that no namespace is associated with a node in the DOM. This is typically found as thenamespaceURI of a node, or used as thenamespaceURI parameter to a namespaces-specific method.New in version 2.2.

XML_NAMESPACE
The namespace URI associated with the reserved prefixxml, as defined byNamespaces in XML (section 4).New in version 2.2.

XMLNS_NAMESPACE
The namespace URI for namespace declarations, as defined byDocument Object Model (DOM) Level 2 Core Specification (section 1.1.8).New in version 2.2.

XHTML_NAMESPACE
The URI of the XHTML namespace as defined byXHTML 1.0: The Extensible HyperText Markup Language (section 3.1.1).New in version 2.2.

In addition,xml.dom contains a baseNode class andthe DOM exception classes. TheNode class provided by thismodule does not implement any of the methods or attributes defined bythe DOM specification; concrete DOM implementations must providethose. TheNode class provided as part of this module doesprovide the constants used for thenodeType attribute onconcreteNode objects; they are located within the classrather than at the module level to conform with the DOMspecifications.


Previous PageUp One LevelNext PagePython Library ReferenceContentsModule IndexIndex
Previous:13.6 xml.domUp:13.6 xml.domNext:13.6.2 Objects in the
Release 2.2.3, documentation updated on 30 May 2003.
SeeAbout this document... for information on suggesting changes.
[8]ページ先頭

©2009-2026 Movatter.jp