Package bitten :: Package util :: Module xmlio :: Class Fragment

Class Fragment

object --+
         |
        Fragment
Known Subclasses:

A collection of XML elements.
Instance Methods
 
__init__(self)
Create an XML fragment.
 
__getitem__(self, nodes)
Add nodes to the fragment.
 
__str__(self)
Return a string representation of the XML fragment.
 
append(self, node)
Append an element or fragment as child.
 
write(self, out, newlines=False)
Serializes the element and writes the XML to the given output stream.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Properties
  children

Inherited from object: __class__

Method Details

__init__(self)
(Constructor)

 
Create an XML fragment.
Overrides: object.__init__

__str__(self)
(Informal representation operator)

 
Return a string representation of the XML fragment.
Overrides: object.__str__