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§

error
siteindex
sitemap
w3c_datetime

Enums§

SitemapsFile
A type representing the data in a sitemap file.

Constants§

MAX_URL_LENGTH
NAMESPACE

Traits§

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