http://www.lalit.org/lab/convert-php-array-to-xml-with-attributes

It’s an old library, but still works well. It has proven invaluable in a recent project for passing data to a cloud api that required it’s data to be submitted as XML, even though it sends data back as json!

Advertisements