Converts data between PHP and XML formats