soap-0.2.0.4: SOAP client tools

Safe HaskellNone

Network.SOAP.Parsing.Stream

Contents

Description

Collection of helpers to use with Text.XML.Stream.Parse parsers.

 let sink = flaxTag "MethodNameResponse"
          $ flaxTag "MethodNameResult" $ do
              info <- flaxTag "Info" $ do
                          q <- readTag "quantity"
                          b <- readTag "balance"
                          return $ Info q b
              rc <- readTag "ResponseCode"
              return (rc, info)

Synopsis

Tags

laxTag :: MonadThrow m => Text -> Sink Event m a -> Sink Event m (Maybe a)Source

Namespace- and attribute- ignorant tagNoAttr.

flaxTag :: MonadThrow m => Text -> Sink Event m a -> Sink Event m aSource

Non-maybe version of laxTag/tagNoAttr.

Content

readContent :: (Read a, MonadThrow m) => Sink Event m aSource

Unpack and read a current tag content.

readTag :: (Read a, MonadThrow m) => Text -> Sink Event m aSource

Unpack and read tag content by local name.

Types to use in custom parser sinks

type Sink i m r = ConduitM i Void m r

Consumes a stream of input values and produces a final result, without producing any output.

Since 0.5.0

data Event

Some XML processing tools are incremental, and work in terms of events rather than node trees. The Event type allows a document to be fully specified as a sequence of events.

Event-based XML libraries include: