public function convert($xmlString) {

        $dom = new \DOMDocument ();
        $dom->loadXML($xmlString);

        $documentElement = $dom->documentElement;
        return $documentElement ? $this->convertDOM($dom->documentElement) : $xmlString;
    }
public function convert($xmlString) {

        $dom = new \DOMDocument ();
        $dom->loadXML($xmlString);

        $documentElement = $dom->documentElement;
        return $documentElement ? $this->convertDOM($dom->documentElement) : $xmlString;
    }
public function convert ( $ xmlString ) { $ dom = new \ DOMDocument ( ) ; $ dom -> loadXML ( $ xmlString ) ; $ documentElement = $ dom -> documentElement ; return $ documentElement ? $ this -> convertDOM ( $ dom -> documentElement ) : $ xmlString ; }
Main conversion API method to convert an XML string into an object tree.

@param unknown_type $xmlString
Main conversion API method to convert an XML string into an object tree .