LXML parser loses text in data event

def data(self, data):
    """catch the data event on parsing the xml file.

    """
    print("data function: " + data)
    self.mydata = data

Your debug output is clear. The text appears as three separate text nodes, and you keep only the last one.

You have to keep track of the start of the tag and concatenate any text nodes found inside.