Safe Haskell | Safe-Infered |
---|
Text.XML.Stream.Render
Description
Enumeratee
s to render XML Event
s. Unlike libxml-enumerator and
expat-enumerator, this module does not provide IO and ST variants, since the
underlying rendering operations are pure functions.
- renderBuilder :: Monad m => RenderSettings -> Conduit Event m Builder
- renderBytes :: MonadUnsafeIO m => RenderSettings -> Conduit Event m ByteString
- renderText :: (MonadThrow m, MonadUnsafeIO m) => RenderSettings -> Conduit Event m Text
- data RenderSettings
- def :: Default a => a
- rsPretty :: RenderSettings -> Bool
- prettify :: Monad m => Conduit Event m Event
Documentation
renderBuilder :: Monad m => RenderSettings -> Conduit Event m BuilderSource
Render a stream of Event
s into a stream of Builder
s. Builders are from
the blaze-builder package, and allow the create of optimally sized
ByteString
s with minimal buffer copying.
renderBytes :: MonadUnsafeIO m => RenderSettings -> Conduit Event m ByteStringSource
Render a stream of Event
s into a stream of ByteString
s. This function
wraps around renderBuilder
and builderToByteString
, so it produces
optimally sized ByteString
s with minimal buffer copying.
The output is UTF8 encoded.
renderText :: (MonadThrow m, MonadUnsafeIO m) => RenderSettings -> Conduit Event m TextSource
Render a stream of Event
s into a stream of ByteString
s. This function
wraps around renderBuilder
, builderToByteString
and renderBytes
, so it
produces optimally sized ByteString
s with minimal buffer copying.
data RenderSettings Source
Instances
rsPretty :: RenderSettings -> BoolSource