Package genshi :: Module builder :: Class Fragment |

# Class Fragment

    object --+
             |
            Fragment

Known Subclasses:
  - Element

Represents a markup fragment, which is basically just a list of element or text nodes.

Instance Methods
__init__(self) Create a new fragment. |
__add__(self, other) |
__call__(self, *args) Append any positional arguments as child nodes. |
__iter__(self) |
__repr__(self) repr(x) |
__str__(self) str(x) |
__unicode__(self) |
__html__(self) |
append(self, node) Append an element or string as child node. |
Stream |
generate(self) Return a markup event stream for the fragment. |
Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Properties
| children
Inherited from `object`: `__class__`

Method Details

### __init__(self) (Constructor) |
Create a new fragment. Overrides: object.__init__

### __call__(self, *args) (Call operator) |
Append any positional arguments as child nodes. See Also: append

### __repr__(self) (Representation operator) |
repr(x) Overrides: object.__repr__ (inherited documentation)

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

### append(self, node) |
Append an element or string as child node. Parameters: `node` - the node to append; can be an Element, Fragment, or a Stream, or a Python string or number