Expand description
Read and write files in the Sitemaps XML format
use std::fs::File;
use std::io::BufReader;
use sitemaps::SitemapsFile;
let file = File::open("tests/data/example_1_url.xml").unwrap();
let reader = BufReader::new(file);
let sitemap = SitemapsFile::read(reader).unwrap();
Modules§
Enums§
- A type representing the data in a sitemap file.
Constants§
Traits§
- A trait to support collecting
<loc>
and<lastmod>
values fromSitemapEntry
s. - A trait containing the behavior
Sitemap
s andSiteIndex
es. - A trait to support entries in sitemap and sitemap index files. In a sitemap file, an entry is indicated by a
<url>
element. In a sitemap index file, an entry is indicated by a<sitemap>
element. Both elements have a required<loc>
child element and an optional<lastmod>
element.