Improve xml handling on php server side.