protected function appendValueToElementToSend($value, \DOMElement $element)
    {
        if ($value instanceof Element) {
            $this->appendElementToElementToSend($value, $element);
        } elseif (is_array($value)) {
            $this->appendValuesToElementToSend($value, $element);
        } elseif (!empty($value)) {
            $element->appendChild(self::getDom()->createTextNode($value));
        }

        return $this;
    }