Expand description
Namespace handlers for extended feed formats
This module provides support for parsing various XML namespaces commonly found in RSS and Atom feeds:
- Dublin Core (
dc:) - Metadata elements - Content (
content:) - Full HTML content - Media RSS (
media:) - Multimedia content - GeoRSS (
georss:) - Geographic location data - Creative Commons (
cc:) - License information
§Usage
These handlers are called by the main parsers when encountering namespaced elements. They update the feed metadata or entries with information from the namespace elements.
§Example
use feedparser_rs::namespace::dublin_core;
use feedparser_rs::FeedMeta;
let mut feed = FeedMeta::default();
dublin_core::handle_feed_element("creator", "John Doe", &mut feed);
assert_eq!(feed.author.as_deref(), Some("John Doe"));Creative Commons license information Creative Commons namespace support for license information
Handles Creative Commons license metadata in RSS and Atom feeds.
Supports both the modern cc:license (with rdf:resource attribute)
and legacy creativeCommons:license text elements.
§Supported Elements
cc:license(withrdf:resourceattribute) - Modern CC namespacecreativeCommons:license(text element) - Legacy Userland namespace
§Specification
Creative Commons: http://creativecommons.org/ns Legacy: http://backend.userland.com/creativeCommonsRssModule
Constants§
- CC
- Creative Commons namespace URI (modern)
- CREATIVE_
COMMONS - Creative Commons legacy namespace URI (Userland)
Functions§
- handle_
entry_ element - Handle Creative Commons element at entry level
- handle_
feed_ element - Handle Creative Commons element at feed level