Package lxml :: Module etree :: Class _XSLTResultTree |
[hide private]
[frames] | no frames]

# Class _XSLTResultTree

      object --+
               |
    _ElementTree --+
                   |
                  _XSLTResultTree

The result of an XSLT evaluation.

Use `str()` or `bytes()` (or `unicode()` in Python 2.x) to serialise to a string, and the `.write_output()` method to write serialise to a file.

Instance Methods | [hide private]
a new object with type S, a subtype of T |
__new__(T, S, ...) |
__str__(x) str(x) |
__unicode__(...) |
write_output(...) write_output(self, file, *, compression=0) |
Inherited from `_ElementTree`: `__copy__`, `__deepcopy__`, `find`, `findall`, `findtext`, `getelementpath`, `getiterator`, `getpath`, `getroot`, `iter`, `iterfind`, `parse`, `relaxng`, `write`, `write_c14n`, `xinclude`, `xmlschema`, `xpath`, `xslt` Inherited from `_ElementTree` (private): `_setroot` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__init__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Properties | [hide private]
| xslt_profile Return an ElementTree with profiling data for the stylesheet run.
Inherited from `_ElementTree`: `docinfo`, `parser` Inherited from `object`: `__class__`

Method Details | [hide private]

### __new__(T, S, ...) |
Returns: a new object with type S, a subtype of T Overrides: object.__new__

### __str__(x) (Informal representation operator) |
str(x) Overrides: object.__str__

### write_output(...) |
write_output(self, file, *, compression=0) Serialise the XSLT output to a file or file-like object. As opposed to the generic `.write()` method, `.write_output()` serialises the result as defined by the `<xsl:output>` tag.