public function readString(string $data)
    {
        $reader = new XMLReader;
        $reader->XML($data);

        $contents = $this->toArray($reader);
        $reader->close();

        return $contents;
    }
public function readString(string $data)
    {
        $reader = new XMLReader;
        $reader->XML($data);

        $contents = $this->toArray($reader);
        $reader->close();

        return $contents;
    }
public function readString ( string $ data ) { $ reader = new XMLReader ; $ reader -> XML ( $ data ) ; $ contents = $ this -> toArray ( $ reader ) ; $ reader -> close ( ) ; return $ contents ; }
Read XML Data from a string

@param string $data The data to read
@return array the array representation of the XML data
Read XML Data from a string