Use the pyexpat module, written in RPython.