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§
- Sitemaps
File - A type representing the data in a sitemap file.
Constants§
Traits§
- Entries
- A trait to support collecting
<loc>and<lastmod>values fromSitemapEntrys. - Sitemaps
- A trait containing the behavior
Sitemaps andSiteIndexes. - Sitemaps
Entry - 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.