下面是网上的 复制代码 代码如下: class ArrayToXML { /** * The main function for converting to an XML document. * Pass in a multi dimensional array and this recrusively loops through and builds up an XML document. * * param array $data * param string $rootNodeName –