/**
  * Convert an array to an XML document
  * A static facade for ease of use and backwards compatibility
  * @param array $array The input array
  * @param array $config The configuration to use for the conversion
  * @return \DOMDocument The XML representation of the input array
  */
 public static function &createXML($array, $config = array())
 {
     // Lalit implementation had ($nodeName, $array) parameter order, so maintain backwards compatibility
     if (is_array($config) && is_string($array)) {
         $swap = $config;
         $config = array('rootNodeName' => $array);
         $array = $swap;
     }
     $instance = new Array2XML($config);
     return $instance->buildXml($array);
 }