Safe Haskell | None |
---|---|
Language | Haskell2010 |
Streaming parser for the OPML 2.0 standard.
The parser tries to be as lenient as possible. All functions may throw an OpmlException
.
- parseOpml :: MonadThrow m => Consumer Event m (Maybe Opml)
- parseOpmlHead :: MonadThrow m => Consumer Event m (Maybe OpmlHead)
- parseOpmlOutline :: MonadThrow m => Consumer Event m (Maybe (Tree OpmlOutline))
- data OpmlException
Parsers
parseOpmlHead :: MonadThrow m => Consumer Event m (Maybe OpmlHead)
Parse the <head>
section.
This function is more lenient than what the standard demands on the following points:
- each sub-element may be repeated, in which case only the last occurrence is taken into account;
- each unknown sub-element is ignored.
parseOpmlOutline :: MonadThrow m => Consumer Event m (Maybe (Tree OpmlOutline))
Parse an <outline>
section.
The value of type attributes are not case-sensitive, that is type="LINK"
has the same meaning as type="link"
.