..given an URL as input (C programming language). (Sitemap specifications from sitemap.org).
As stated in the comments by apphacker we don't really know what you're trying to do. If you are planning on just scraping links from a html website then I would recommend some sort of lexical scanner generator: like flex.
If you are getting a website url as input then you are going to need to use the some networking code to read the webpages. If you don't know anything about networking in C then I would recommend googling beej's guides and going from there.
If you are just getting a straight XML file as your tags suggest then once again I would recommend flex if you absolutely must use C. If you don't have to use C then I would recommend Perl or Python; they are probably better suited to the job.
Either way we need you to give us more information but I hope that helps for now.