Base class for all element types. This class is inspired by the class
of the same name in the Python standard library's xml.dom package. One
important distinction is that the standard DOM element is used to
represent the structure of a document at a much finer level of detail
than here. For example, in the case of the standard DOM element, each
XML attribute is its own element being a child node of its tag, while
here they are simply stored as attributes of the tag element itself.
Despite the differences, the documentation for the xml.dom package,
particularly that of the Element class and it's parent, the Node class,
is useful as supplementary material in understanding how to use this
class.
|
|
|
_verifyChildren(self,
i)
Method used internally by some elements to verify that their children
are from the allowed set and in the correct order following
modifications to their child list. |
source code
|
|
|
|
|
appendData(self,
content)
Add characters to the element's pcdata. |
source code
|
|
|
endElement(self)
Method invoked by document parser when it encounters the
end-of-element event. |
source code
|
|
|
end_tag(self,
indent)
Generate the string for the element's end tag. |
source code
|
|
|
|
|
|
|
getElements(self,
filter)
Return a list of elements below and including this element for which
filter(element) returns True. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
start_tag(self,
indent)
Generate the string for the element's start tag. |
source code
|
|
|
unlink(self)
Break internal references within the document tree rooted on this
element to promote garbage collection. |
source code
|
|
|
write(self,
fileobj=<epydoc.docintrospecter._DevNull instance at 0x7f39154699e0>,
indent=u'
' )
Recursively write an element and it's children to a file. |
source code
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|