(self)
return xml.to_string(element)
provide the ability for a widget to serialize itself
provide the ability for a widget to serialize itself
provide the ability for a widget to serialize itself
def serialize(self):
        '''provide the ability for a widget to serialize itself'''

        xml = Xml()
        xml.create_doc("config")

        # create the top element
        element = xml.create_element("element")
        xml.set_attribute(element, "name", self.name)

        # create the display handler
        display = xml.create_element("display")
        xml.set_attribute(display, "class", Common.get_full_class_name(self) )
        element.appendChild(display)

        # create the options
        for name, value in self.kwargs.items():
            if value:
                option = xml.create_text_element(name, value)
            else:  # avoid the \n in the textContent of the textNode 
                option = xml.create_element(name) 
            display.appendChild(option)

        return xml.to_string(element)
def serialize ( self ) : xml = Xml ( ) xml . create_doc ( "config" ) # create the top element element = xml . create_element ( "element" ) xml . set_attribute ( element , "name" , self . name ) # create the display handler display = xml . create_element ( "display" ) xml . set_attribute ( display , "class" , Common . get_full_class_name ( self ) ) element . appendChild ( display ) # create the options for name , value in self . kwargs . items ( ) : if value : option = xml . create_text_element ( name , value ) else : # avoid the \n in the textContent of the textNode  option = xml . create_element ( name ) display . appendChild ( option ) return xml . to_string ( element )