public function addObject($object, $cdata = false, $key = false)
    {
        if (!is_object($object) && !is_array($object)) {
            return;
        }

        if ($key && Conversion::validateNodeName($key)) {
            $key = $this->dom->createElement($key);
            $conversion = new Conversion($object);
            $conversion->objectToDomElement($object, $key, $this->dom);
        } else {
            $conversion = new Conversion($object);
            $conversion->objectToDomElement($object, $this->page, $this->dom);
        }
    }