lxml.tests.test_threading.ThreadPipelineTestCase.ParseWorker

Package lxml :: Package tests :: Module test_threading :: Class ThreadPipelineTestCase :: Class ParseWorker |
[hide private]
[frames] | no frames]

# Class ParseWorker

source code

               object --+
                        |
       threading._Verbose --+
                            |
             threading.Thread --+
                                |
    ThreadPipelineTestCase.Worker --+
                                    |
                                   ThreadPipelineTestCase.ParseWorker

Instance Methods | [hide private]
XML(text, parser=None, base_url=None) Parses an XML document or fragment from a string constant. Returns the root node (or the result returned by a parser target). This function can be used to embed "XML literals" in Python code, like in |
handle(self, xml) | source code
Inherited from `Worker`: `__init__`, `run` Inherited from `threading.Thread`: `__repr__`, `getName`, `isAlive`, `isDaemon`, `is_alive`, `join`, `setDaemon`, `setName`, `start` Inherited from `threading.Thread` (private): `_set_daemon`, `_set_ident` Inherited from `threading._Verbose` (private): `_note` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Properties | [hide private]
Inherited from `threading.Thread`: `daemon`, `ident`, `name` Inherited from `object`: `__class__`

Method Details | [hide private]

### XML(text, parser=None, base_url=None) |
> Parses an XML document or fragment from a string constant. Returns the root node (or the result returned by a parser target). 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, ...).