|
|
|
|
a new object with type S, a subtype of T
|
|
|
_setroot(self,
root)
Relocate the ElementTree to a new root node. |
|
|
|
find(self,
path)
Finds the first toplevel element with given tag. Same as
tree.getroot().find(path). |
|
|
|
findall(self,
path)
Finds all elements matching the ElementPath expression. Same as
getroot().findall(path). |
|
|
|
findtext(self,
path,
default=None)
Finds the text for the first element matching the ElementPath
expression. Same as getroot().findtext(path) |
|
|
|
getiterator(self,
tag=None)
Returns a sequence or iterator of all elements in document order
(depth first pre-order), starting with the root element. |
|
|
|
getpath(self,
element)
Returns a structural, absolute XPath expression to find that element. |
|
|
|
getroot(self)
Gets the root element for this tree. |
|
|
|
iter(self,
tag=None)
Creates an iterator for the root element. The iterator loops over
all elements in this tree, in document order. |
|
|
|
iterfind(self,
path)
Iterates over all elements matching the ElementPath expression.
Same as getroot().finditer(path). |
|
|
|
parse(self,
source,
parser=None,
base_url=None)
Updates self with the content of source and returns its root |
|
|
|
relaxng(self,
relaxng)
Validate this document using other document. |
|
|
|
write(self,
file,
encoding=None,
method="xml",
pretty_print=False,
xml_declaration=None,
with_tail=True,
standalone=None,
compression=0)
Write the tree to a filename, file or file-like object. |
|
|
|
write_c14n(self,
file,
exclusive=False,
with_comments=True,
compression=0)
C14N write of document. Always writes UTF-8. |
|
|
|
xinclude(self)
Process the XInclude nodes in this document and include the
referenced XML fragments. |
|
|
|
xmlschema(self,
xmlschema)
Validate this document using other document. |
|
|
|
xpath(self,
_path,
namespaces=None,
extensions=None,
smart_strings=True,
**_variables)
XPath evaluate in context of document. |
|
|
|
xslt(self,
_xslt,
extensions=None,
access_control=None,
**_kw)
Transform this document using other document. |
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__init__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|