Moving write function out of mp_xml

That will prevent php Cannot redeclare write() Fatal Error
Merge pull request #4 from daneoshiga/changing_write_function

Moving write function out of mp_xml