Documentation ¶
Index ¶
- Variables
- func DecodeEntities(str string) (string, error)
- func FindRoot(p *xpp.XMLPullParser) (event xpp.XMLEventType, err error)
- func IsExtension(p *xpp.XMLPullParser) bool
- func NewReaderLabel(label string, input io.Reader) (io.Reader, error)
- func NewXMLSanitizerReader(xml io.Reader) io.Reader
- func NextTag(p *xpp.XMLPullParser) (event xpp.XMLEventType, err error)
- func ParseDate(ds string) (t time.Time, err error)
- func ParseExtension(fe ext.Extensions, p *xpp.XMLPullParser) (ext.Extensions, error)
- func ParseNameAddress(nameAddressText string) (name string, address string)
- func ParseText(p *xpp.XMLPullParser) (string, error)
Constants ¶
This section is empty.
Variables ¶
var ( TruncatedEntity = errors.New("truncated entity") InvalidNumericReference = errors.New("invalid numeric reference") )
Functions ¶
func DecodeEntities ¶
DecodeEntities decodes escaped XML entities in a string and returns the unescaped string
func FindRoot ¶
func FindRoot(p *xpp.XMLPullParser) (event xpp.XMLEventType, err error)
FindRoot iterates through the tokens of an xml document until it encounters its first StartTag event. It returns an error if it reaches EndDocument before finding a tag.
func IsExtension ¶
func IsExtension(p *xpp.XMLPullParser) bool
IsExtension returns whether or not the current XML element is an extension element (if it has a non empty prefix)
func NewXMLSanitizerReader ¶
NewXMLSanitizerReader creates an io.Reader that wraps another io.Reader and removes illegal xml characters from the io stream.
func NextTag ¶
func NextTag(p *xpp.XMLPullParser) (event xpp.XMLEventType, err error)
NextTag iterates through the tokens until it reaches a StartTag or EndTag It is similar to goxpp's NextTag method except it wont throw an error if the next immediate token isnt a Start/EndTag. Instead, it will continue to consume tokens until it hits a Start/EndTag or EndDocument.
func ParseDate ¶
ParseDate parses a given date string using a large list of commonly found feed date formats.
func ParseExtension ¶
func ParseExtension(fe ext.Extensions, p *xpp.XMLPullParser) (ext.Extensions, error)
ParseExtension parses the current element of the XMLPullParser as an extension element and updates the extension map
func ParseNameAddress ¶
ParseNameAddress parses name/email strings commonly found in RSS feeds of the format "Example Name (example@site.com)" and other variations of this format.
Types ¶
This section is empty.