Home | Trees | Indices | Help |
|
---|
|
Version: 1.3.6-48216
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
Comment element factory. This factory function creates a special element that will be serialized as an XML comment. |
Element factory. This function returns an object implementing the Element interface. |
Retrieve the function namespace object associated with the given URI. Creates a new one if it does not yet exist. A function namespace can only be used to register extension functions. |
Parses an HTML document from a string constant. This function can be used to embed "HTML literals" in Python code. To override the parser with a different ``HTMLParser`` you can pass it to the ``parser`` keyword argument. The ``base_url`` keyword argument allows to set the original base URL of the document to support relative Paths when looking up external entities (DTD, XInclude, ...). |
Retrieve the namespace object associated with the given URI. Creates a new one if it does not yet exist. |
Comment element factory. This factory function creates a special element that will be serialized as an XML comment. |
Comment element factory. This factory function creates a special element that will be serialized as an XML comment. |
Subelement factory. This function creates an element instance, and appends it to an existing element. |
Parses an XML document from a string constant. This function can be used to embed "XML literals" in Python code, like in >>> root = etree.XML("<root><test/></root>") To override the parser with a different ``XMLParser`` you can pass it to the ``parser`` keyword argument. The ``base_url`` keyword argument allows to set the original base URL of the document to support relative Paths when looking up external entities (DTD, XInclude, ...). |
Parse the text and return a tuple (root node, ID dictionary). The root node is the same as returned by the XML() function. The dictionary contains string-element pairs. The dictionary keys are the values of ID attributes as defined by the DTD. The elements referenced by the ID are stored as dictionary values. Note that you must not modify the XML tree if you use the ID dictionary. The results are undefined. |
Parse the text and return a tuple (root node, ID dictionary). The root node is the same as returned by the XML() function. The dictionary contains string-element pairs. The dictionary keys are the values of 'id' attributes. The elements referenced by the ID are stored as dictionary values. |
Creates an XPath evaluator for an ElementTree or an Element. The resulting object can be called with an XPath expression as argument and XPath variables provided as keyword arguments. XPath evaluators must not be shared between threads. |
Clear the global error log. Note that this log is already bound to a fixed size. |
Writes an element tree or element structure to sys.stdout. This function should be used for debugging only. |
Parses an XML document from a string. To override the default parser with a different parser you can pass it to the ``parser`` keyword argument. The ``base_url`` keyword argument allows to set the original base URL of the document to support relative Paths when looking up external entities (DTD, XInclude, ...). |
Return an ElementTree object loaded with source elements. If no parser is provided as second argument, the default parser is used. |
Parses the source into a tuple containing an ElementTree object and an ID dictionary. If no parser is provided as second argument, the default parser is used. Note that you must not modify the XML tree if you use the ID dictionary. The results are undefined. |
Set a default parser for the current thread. This parser is used globally whenever no parser is supplied to the various parse functions of the lxml API. If this function is called without a parser (or if it is None), the default parser is reset to the original configuration. Note that the pre-installed default parser is not thread-safe. Avoid the default parser in multi-threaded environments. You can create a separate parser for each thread explicitly or use a parser pool. |
Serialize an element to an encoded string representation of its XML tree. Defaults to ASCII encoding without XML declaration. This behaviour can be configured with the keyword arguments 'encoding' (string) and 'xml_declaration' (bool). Note that changing the encoding to a non UTF-8 compatible encoding will enable a declaration by default. The keyword argument 'pretty_print' (bool) enables formatted XML. |
Serialize an element to the Python unicode representation of its XML tree. Note that the result does not carry an XML encoding declaration and is therefore not necessarily suited for serialization to byte streams without further treatment. The keyword argument 'pretty_print' (bool) enables formatted XML. |
Replace the global error log by an etree.PyErrorLog that uses the standard Python logging package. Note that this disables access to the global error log from exceptions. Parsers, XSLT etc. will continue to provide their normal local error log. |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0 on Mon Feb 11 15:49:34 2008 | http://epydoc.sourceforge.net |