class XmlServer(XmlStream):

    def __init__(self):
        XmlStream.__init__(self)

def dataReceived(self, data):
    """ Overload this function to simply pass the incoming data into the XML parser """
try:
    self.stream.parse(data)
except Exception as e:
    pass
Twisted XmlStream: How to connect to events?