Crate sitemaps

source ·
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§

Constants§

Traits§

  • A trait to support collecting <loc> and <lastmod> values from SitemapEntrys.
  • A trait containing the behavior Sitemaps and SiteIndexes.
  • 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.