sax-0.1.0.0: Monadic streaming parser based on xeno xml parsing library

Safe HaskellNone
LanguageHaskell2010

SAX

Synopsis

Documentation

data Result r Source #

Constructors

Partial (SaxEvent -> Result r) [ByteString] SaxStream

Partial result contains a continuation, a list of tags that parser will skip automatically(if parsers from skipUntil family of combinators were used before) the rest of the stream to consume

Done r

The parse succeeded. The i parameter is the input that had not yet been consumed (if any) when the parse succeeded.

Fail String

The parse failed with current message

Instances

Functor Result Source # 

Methods

fmap :: (a -> b) -> Result a -> Result b #

(<$) :: a -> Result b -> Result a #

Show r => Show (Result r) Source # 

Methods

showsPrec :: Int -> Result r -> ShowS #

show :: Result r -> String #

showList :: [Result r] -> ShowS #

newtype SaxParser a Source #

Constructors

SaxParser 

Fields

Instances

withTag :: ByteString -> SaxParser a -> SaxParser a Source #

Parses tag with its content, skipping the attributes.

skipTag :: ByteString -> SaxParser () Source #

Skips a tag and all of its children.