public function sendRaw($data, $rootNode, $endOfMessageDelimiter, $attributes=array(), $waitForReply=true)
    {

        $data = str_replace('<?xml version="1.0"?>', '', (string)$data);

        $data = new SimpleXMLElement("<{$rootNode}>$data</{$rootNode}>");

        foreach ($attributes as $attribute_name=>$attribute_value) {

            $data->addAttribute($attribute_name, $attribute_value);

        }

        $data = str_replace('<?xml version="1.0"?>', '', $data->asXML());

        $this->sendHistory[] = $data;

        $this->ssh->write($data."]]>]]>\n");

        if (!$waitForReply) {

            return true;

        }

        return $this->readReply($endOfMessageDelimiter);
    }