code: def to_xml(self):
          
          makeValid = make_valid_xml_value
  
          xml = '<xml><more>%s</more>' % (self.more)
  
          for message_type, message in self.console_messages:
              xml += '<%s message="%s"></%s>' % (message_type, makeValid(message), message_type)
  
          xml += '</xml>'
  
          return xml
docs: Create an XML for console message_list, error and more (true/false)
          <xml>
              <message_list>console message_list</message_list>
              <error>console error</error>
              <more>true/false</more>
          </xml>