public function replaceChildAt($index, XMLElement $child = null)
    {
        if (!is_numeric($index)) {
            return false;
        }

        $this->validateChild($child);

        $index = $this->getRealIndex($index);

        if (!isset($this->_children[$index])) {
            return false;
        }

        $this->_children[$index] = $child;

        return true;
    }