I wrote a program to extract data from sitemaps's as this format
type URLSet struct {
Urls []SitemapURL `xml:"url"`
}
type SitemapURL struct {
Location string `xml:"loc"`
LastModifiedDate string `xml:"lastmod"`
ChangeFrequency string `xml:"changefreq"`
Priority string `xml:"priority"`
}
but some domains have other shape of xml file like this
type URLSet struct {
Urls []SitemapURL `xml:"url"`
}
type SitemapURL struct {
Location string `xml:"loc"`
ChangeFrequency string `xml:"changefreq"`
Priority string `xml:"priority"`
LastModifiedDate string `xml:"lastmod"`
}
Any body can help me to handle these both things at same time