Logo Search packages:      
Sourcecode: suds version File versions  Download package

def suds::sax::element::Element::append (   self,
  objects 
)

Append the specified child based on whether it is an
element or an attrbuite.
@param objects: A (single|collection) of attribute(s) or element(s)
    to be added as children.
@type objects: (L{Element}|L{Attribute})
@return: self
@rtype: L{Element}

Definition at line 314 of file element.py.

00314                              :
        """
        Append the specified child based on whether it is an
        element or an attrbuite.
        @param objects: A (single|collection) of attribute(s) or element(s)
            to be added as children.
        @type objects: (L{Element}|L{Attribute})
        @return: self
        @rtype: L{Element}
        """
        if not isinstance(objects, (list, tuple)):
            objects = (objects,)
        for child in objects:
            if isinstance(child, Element):
                self.children.append(child)
                child.parent = self
                continue
            if isinstance(child, Attribute):
                self.attributes.append(child)
                child.parent = self
                continue
            raise Exception('append %s not-valid' % child.__class__.__name__)
        return self
    
    def insert(self, objects, index=0):


Generated by  Doxygen 1.6.0   Back to index