adding support for attributes in phpToXml. Adding multiple function support in api_post