public function xmlToArray( $string )
    {

        $doc = new DOMDocument();
        $doc->loadXML( $string );
        $root = $doc->documentElement;

        return $this->DomNodeToArray( $root );
    }