Quick and dirty pyx2xml function. I'll improve it later.