function AddUrl($url, ChangeFrequency $changeFreq = null, $priority= null, Date $lastMod = null)
    {
        $elm = $this->domDoc->createElement("url");
        $this->AppendTextChild($elm, "loc", $url);
        
        if ($changeFreq)
            $this->AppendTextChild($elm, "changefreq", (string)$changeFreq);
        
        if ($priority)
            $this->AppendTextChild($elm, "priority", $priority);
        
        if ($lastMod)
            $this->AppendTextChild($elm, "lastmod", $lastMod->ToString('c'));
        
        $this->urlset->appendChild($elm);
    }