rdf

package
v2.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(baseURL string, data io.ReadSeeker) (*model.Feed, error)

Parse returns a normalized feed struct from a RDF feed.

Types

type RDF added in v2.1.2

type RDF struct {
	XMLName xml.Name   `xml:"http://www.w3.org/1999/02/22-rdf-syntax-ns# RDF"`
	Channel RDFChannel `xml:"channel"`
	Items   []RDFItem  `xml:"item"`
}

RDF sepcs: https://web.resource.org/rss/1.0/spec

type RDFAdapter added in v2.1.2

type RDFAdapter struct {
	// contains filtered or unexported fields
}

func NewRDFAdapter added in v2.1.2

func NewRDFAdapter(rdf *RDF) *RDFAdapter

func (*RDFAdapter) BuildFeed added in v2.1.2

func (r *RDFAdapter) BuildFeed(baseURL string) *model.Feed

type RDFChannel added in v2.1.2

type RDFChannel struct {
	Title       string `xml:"title"`
	Link        string `xml:"link"`
	Description string `xml:"description"`
	dublincore.DublinCoreChannelElement
}

type RDFItem added in v2.1.2

type RDFItem struct {
	Title       string `xml:"http://purl.org/rss/1.0/ title"`
	Link        string `xml:"link"`
	Description string `xml:"description"`
	dublincore.DublinCoreItemElement
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL