Safe Haskell | None |
---|---|
Language | Haskell2010 |
- type SaxStream = Stream (Of SaxEvent) (Either XenoException) ()
- data Result r
- newtype SaxParser a = SaxParser {
- runSaxParser :: forall r. [ByteString] -> SaxStream -> ([ByteString] -> SaxStream -> Result r) -> ([ByteString] -> SaxStream -> a -> Result r) -> Result r
- parseSax :: SaxParser a -> SaxStream -> Result a
- skip :: SaxParser ()
- skipAndMark :: SaxParser ()
- openTag :: ByteString -> SaxParser ()
- endOfOpenTag :: ByteString -> SaxParser ()
- bytes :: SaxParser ByteString
- closeTag :: ByteString -> SaxParser ()
- skipUntil :: SaxParser a -> SaxParser a
- withTag :: ByteString -> SaxParser a -> SaxParser a
- withTagAndAttrs :: ByteString -> SaxParser attrs -> SaxParser a -> SaxParser (attrs, a)
- skipTag :: ByteString -> SaxParser ()
- atTag :: ByteString -> SaxParser a -> SaxParser a
- streamXml :: MonadError XenoException m => ByteString -> Stream (Of SaxEvent) m ()
Documentation
Partial (SaxEvent -> Result r) [ByteString] SaxStream | Partial result contains a continuation, a list of tags that parser will
skip automatically(if parsers from |
Done r | The parse succeeded. The |
Fail String | The parse failed with current message |
SaxParser | |
|
skipAndMark :: SaxParser () Source #
openTag :: ByteString -> SaxParser () Source #
endOfOpenTag :: ByteString -> SaxParser () Source #
closeTag :: ByteString -> SaxParser () Source #
withTag :: ByteString -> SaxParser a -> SaxParser a Source #
Parses tag with its content, skipping the attributes.
withTagAndAttrs :: ByteString -> SaxParser attrs -> SaxParser a -> SaxParser (attrs, a) Source #
skipTag :: ByteString -> SaxParser () Source #
Skips a tag and all of its children.
streamXml :: MonadError XenoException m => ByteString -> Stream (Of SaxEvent) m () Source #