def __str__(self, indent=0):
        """String representation of XML element
        """

        if self.root_element is True:
            increment = 0
        else:
            increment = 4

        s = tab = ' '*indent

        s += '<%s>' %self.tag
        if isinstance(self.value, basestring):
            s += remove_whitespace(self.value)
        else:
            s += '\n'
            for e in self.value:
                s += e.__str__(indent+increment)
            s += tab

        if self.root_element is False:
            s += '</%s>\n' %self.tag

        return s
def __str__ ( self , indent = 0 ) : if self . root_element is True : increment = 0 else : increment = 4 s = tab = ' ' * indent s += '<%s>' % self . tag if isinstance ( self . value , basestring ) : s += remove_whitespace ( self . value ) else : s += '\n' for e in self . value : s += e . __str__ ( indent + increment ) s += tab if self . root_element is False : s += '</%s>\n' % self . tag return s
String representation of XML element