Package lxml :: Module etree :: Class Resolver

[hide private]
[frames] | no frames]

# Class Resolver

    object --+
             |
            Resolver

This is the base class of all resolvers.

Instance Methods | [hide private]

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

resolve(...) Override this method to resolve an external source by ``system_url`` and ``public_id``. |

resolve_empty(...) Return an empty input document. |

resolve_file(...) Return an open file-like object as input document. |

resolve_filename(...) Return the name of a parsable file as input document. |

resolve_string(...) Return a parsable string as input document. |

Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__init__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Properties | [hide private]

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__

### resolve(...)

Override this method to resolve an external source by ``system_url`` and ``public_id``. The third argument is an opaque context object.

Return the result of one of the ``resolve_*()`` methods.

### resolve_empty(...)

Return an empty input document.

Pass context as parameter.

### resolve_file(...)

Return an open file-like object as input document.

Pass open file and context as parameters.

### resolve_filename(...)

Return the name of a parsable file as input document.

Pass filename and context as parameters.

### resolve_string(...)

Return a parsable string as input document.

Pass data string and context as parameters.

You can pass the source URL as 'base_url' keyword.