PHP xml_encode using DOMDocument; Convert Array to XML; json_encode

Reply to comment

This is great .. the only change I made was:

if (rtrim($index,'s')!==$index && count($mixedElement)>1) {

Any node ending with 's' was causing an unecessary child node. (ie: STATUS was STATUS with a child node STATU)

Thanks again.