Package lxml :: Module etree :: Class _ProcessingInstruction

[hide private]
[frames] | no frames]

# Class _ProcessingInstruction

          object --+
                   |
            _Element --+
                       |
    __ContentOnlyElement --+
                           |
                          _ProcessingInstruction

Known Subclasses:
  - PIBase

Instance Methods | [hide private]

a new object with type S, a subtype of T

__new__(T, S, ...) |

__repr__(x) repr(x) |

get(self, key, default=None) Try to parse pseudo-attributes from the text content of the processing instruction, search for one with the given key as name and return its associated value. |

Inherited from `__ContentOnlyElement`: `__delitem__`, `__getitem__`, `__len__`, `__setitem__`, `append`, `insert`, `items`, `keys`, `set`, `values`

Inherited from `_Element`: `__contains__`, `__copy__`, `__deepcopy__`, `__iter__`, `__nonzero__`, `__reversed__`, `addnext`, `addprevious`, `clear`, `extend`, `find`, `findall`, `findtext`, `getchildren`, `getiterator`, `getnext`, `getparent`, `getprevious`, `getroottree`, `index`, `iter`, `iterancestors`, `iterchildren`, `iterdescendants`, `iterfind`, `itersiblings`, `itertext`, `makeelement`, `remove`, `replace`, `xpath`

Inherited from `_Element` (private): `_init`

Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__init__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Properties | [hide private]

| attrib Returns a dict containing all pseudo-attributes that can be parsed from the text content of this processing instruction. Note that modifying the dict currently has no effect on the XML node, although this is not guaranteed to stay this way.
| tag Element tag
| target
Inherited from `__ContentOnlyElement`: `text` Inherited from `_Element`: `base`, `nsmap`, `prefix`, `sourceline`, `tail` 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__

### __repr__(x)
(Representation operator)

repr(x)

Overrides: object.__repr__

### get(self, key, default=None)

Try to parse pseudo-attributes from the text content of the processing instruction, search for one with the given key as name and return its associated value.

Note that this is only a convenience method for the most common case that all text content is structured in attribute-like name-value pairs with properly quoted values. It is not guaranteed to work for all possible text content.

Overrides: _Element.get