Creates an appropriate object based on the version of PHP that is running and the requested xml source. This function should be passed an array containing either 'filename' => $filename | 'xml' => $xmlstring depending on the source of the XML document.