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
.
Synopsis
- parseOpml :: MonadCatch m => ConduitM Event o m (Maybe Opml)
- parseOpmlHead :: MonadCatch m => ConduitM Event o m (Maybe OpmlHead)
- parseOpmlOutline :: MonadCatch m => ConduitM Event o m (Maybe (Tree OpmlOutline))
- data OpmlException
Parsers
parseOpml :: MonadCatch m => ConduitM Event o m (Maybe Opml) Source #
Parse the top-level <opml>
element.
parseOpmlHead :: MonadCatch m => ConduitM Event o m (Maybe OpmlHead) Source #
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 first occurrence is taken into account;
- each unknown sub-element is ignored.
parseOpmlOutline :: MonadCatch m => ConduitM Event o m (Maybe (Tree OpmlOutline)) Source #
Parse an <outline>
section.
The value of type attributes are not case-sensitive, that is type="LINK"
has the same meaning as type="link"
.
Exceptions
data OpmlException Source #
MissingText | |
InvalidBool Text | |
InvalidDecimal Text | |
InvalidTime Text | |
InvalidURI URIParseError | |
InvalidVersion Text |
Instances
Eq OpmlException Source # | |
Defined in Text.OPML.Conduit.Parse (==) :: OpmlException -> OpmlException -> Bool # (/=) :: OpmlException -> OpmlException -> Bool # | |
Show OpmlException Source # | |
Defined in Text.OPML.Conduit.Parse showsPrec :: Int -> OpmlException -> ShowS # show :: OpmlException -> String # showList :: [OpmlException] -> ShowS # | |
Exception OpmlException Source # | |
Defined in Text.OPML.Conduit.Parse |