Copyright | (c) Galois Inc. 2008 (c) Sigbjorn Finne 2009- |
---|---|
License | BSD3 |
Maintainer | Sigbjorn Finne <sof@forkIO.com> |
Stability | provisional |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Text.Feed.Import
Description
Convert from XML to Feeds.
Synopsis
- parseFeedFromFile :: FilePath -> IO (Maybe Feed)
- parseFeedString :: String -> Maybe Feed
- parseFeedSource :: FeedSource s => s -> Maybe Feed
- class FeedSource s
- readRSS2 :: Element -> Maybe Feed
- readRSS1 :: Element -> Maybe Feed
- readAtom :: Element -> Maybe Feed
Documentation
parseFeedFromFile :: FilePath -> IO (Maybe Feed) #
'parseFeedFromFile fp' reads in the contents of the file at fp
;
the assumed encoding is UTF-8.
parseFeedString :: String -> Maybe Feed #
parseFeedSource :: FeedSource s => s -> Maybe Feed #
'parseFeedSource s' tries to parse the source s
as
one of the feed formats. First as Atom, then RSS2 before giving
RSS1 a try. Nothing
is, rather unhelpfully, returned as an
indication of error.
class FeedSource s #
Minimal complete definition
parseFeedSourceXML
Instances
FeedSource ByteString # | |
Defined in Text.Feed.Import Methods parseFeedSourceXML :: ByteString -> Either SomeException Document | |
FeedSource Text # | |
Defined in Text.Feed.Import Methods parseFeedSourceXML :: Text -> Either SomeException Document | |
FeedSource String # | |
Defined in Text.Feed.Import Methods parseFeedSourceXML :: String -> Either SomeException Document |
readRSS2 :: Element -> Maybe Feed #
'readRSS2 elt' tries to derive an RSS2.x, RSS-0.9x feed document
from the XML element e
.