protected function __toSend($asDomElement = false)
    {
        /**
         * Create element tag.
         */
        $element = self::getDom()->createElement($this->getNamespacedName());
        $element->setAttributeNS('http://www.w3.org/2000/xmlns/', sprintf('xmlns:%s', $this->getNamespacePrefix()), $this->getNamespace());
        /*
         * Define element value
         * Add attributes if there are any
         */
        $this
            ->appendValueToElementToSend($this->getValue(), $element)
            ->appendAttributesToElementToSend($element)
        ;
        // Returns element content
        if ($asDomElement) {
            return $element;
        }

        return self::getDom()->saveXML($element);
    }