Package xml :: Package dom :: Module minidom
[hide private]
[frames] | no frames]

Module minidom

minidom.py -- a lightweight DOM implementation.

parse("foo.xml")

parseString("<foo><bar/></foo>")

Todo:
=====
 * convenience methods for getting elements and text.
 * more testing
 * bring some of the writer and linearizer code into conformance with this
        interface
 * SAX 2 namespaces

Classes [hide private]
Node
DocumentFragment
Attr
NamedNodeMap
The attribute list is a transient interface to the underlying dictionaries.
AttributeList
The attribute list is a transient interface to the underlying dictionaries.
TypeInfo
Element
Childless
Mixin that makes childless-ness easy to implement and avoids the complexity of the Node methods that deal with children.
ProcessingInstruction
CharacterData
Text
Comment
CDATASection
ReadOnlySequentialNamedNodeMap
Identified
Mix-in class that supports the publicId and systemId attributes.
DocumentType
Entity
Notation
DOMImplementation
ElementInfo
Object that represents content-model information for an element.
Document
Functions [hide private]
 
_append_child(self, node)
 
_in_document(node)
 
_write_data(writer, data)
Writes datachars to writer.
 
_get_elements_by_tagName_helper(parent, name, rc)
 
_get_elements_by_tagName_ns_helper(parent, nsURI, localName, rc)
 
_set_attribute_node(element, attr)
 
_get_containing_element(node)
 
_get_containing_entref(node)
 
_clear_id_cache(node)
 
_clone_node(node, deep, newOwnerDocument)
Clone a node and give it the new owner document.
 
_nssplit(qualifiedName)
 
_get_StringIO()
 
_do_pulldom_parse(func, args, kwargs)
 
parse(file, parser=None, bufsize=None)
Parse a file into a DOM by filename or file object.
 
parseString(string, parser=None)
Parse a file into a DOM from a string.
 
getDOMImplementation(features=None)
Variables [hide private]
  _nodeTypes_with_children = (1, 5)
  _no_type = <TypeInfo None>

Imports: xml, EMPTY_NAMESPACE, EMPTY_PREFIX, XMLNS_NAMESPACE, domreg, NodeList, EmptyNodeList, defproperty, StringTypes, DOMImplementationLS, DocumentLS


Function Details [hide private]

_clone_node(node, deep, newOwnerDocument)

 

Clone a node and give it the new owner document. Called by Node.cloneNode and Document.importNode