I want to create a spider which scrapes urls based on `sitemap.xml` of the webpage. So I don't have `start_urls`. I want to determine which urls to scrape using `sitemap.xml`.

I thought about adding a method `_parse_sitemap` and parse it using `requests` and `lxml` but it can be an overkill. 

Is there some built-in method to get all urls inside `<loc>` tags?

What I have done so far:

Spider gets one url and `meta = {'sitemap':True}` so parse method knows that it has to call `_parse_sitemap` which `yield`s `Request` objects based on urls from sitemap. 

```
import scrapy
from scrapy import Request

class MainSpider(scrapy.Spider):
    name = 'main_spider'
    allowed_domains = ['www.example.com']
    sitemap = 'www.example.com/sitemap.xml'
    start_urls = [sitemap]

    def start_requests(self):
        yield Request(url=self.sitemap,meta={'sitemap':True})

    def parse(self, response):
        if response.meta.get('sitemap'):
            self._parse_sitemap(response)
        else:
            # parse normal url

    def _parse_sitemap(self, response):
        # how to get urls?
        urls = []
        for url in urls:
            yield Request(url=url,callback=self.parse)

```

It's just one `xml` so I think I shouldn't use `SitemapSpider`. What do you recommend? As you can see I don't know how to parse `urls` inside `_parse_sitemap` spider.