Safe Haskell | None |
---|
- data XmlElement
- type ElementPath = Tree ElementName
- (.=) :: ElementName -> [ElementPath] -> ElementPath
- (.-) :: ElementName -> ElementPath -> ElementPath
- tag :: ToText a => a -> ElementName
- end :: ElementName -> ElementPath
- anytag :: ElementName
- data ParseError = ParseError {}
- elementConsumer :: MonadThrow m => Consumer Event m XmlElement
- elementConduit :: MonadThrow m => ElementPath -> Conduit Event m XmlElement
- convert :: MonadThrow m => (XmlElement -> m a) -> ConduitM XmlElement o m a
- tryConvert :: MonadBaseControl IO m => (XmlElement -> m a) -> ConduitM XmlElement o m (Maybe a)
- convertMany :: MonadBaseControl IO m => (XmlElement -> m a) -> ConduitM XmlElement o m [a]
- convertConduit :: MonadBaseControl IO m => (XmlElement -> m a) -> Conduit XmlElement m a
- content :: (MonadThrow m, FromText t) => XmlElement -> m t
- (.<) :: (MonadThrow m, FromText a) => XmlElement -> Text -> m a
- element :: MonadThrow m => Text -> (XmlElement -> m a) -> XmlElement -> m a
- elementM :: MonadThrow m => Text -> (XmlElement -> m a) -> XmlElement -> m (Maybe a)
- elements :: MonadThrow m => Text -> Text -> (XmlElement -> m a) -> XmlElement -> m [a]
Documentation
type ElementPath = Tree ElementNameSource
(.=) :: ElementName -> [ElementPath] -> ElementPathSource
infix version of Node
(.-) :: ElementName -> ElementPath -> ElementPathSource
end :: ElementName -> ElementPathSource
data ParseError Source
elementConsumer :: MonadThrow m => Consumer Event m XmlElementSource
top-level xml element consumer. e.g.,
elementConduit :: MonadThrow m => ElementPath -> Conduit Event m XmlElementSource
map from Event
to XmlElement
.
convert :: MonadThrow m => (XmlElement -> m a) -> ConduitM XmlElement o m aSource
tryConvert :: MonadBaseControl IO m => (XmlElement -> m a) -> ConduitM XmlElement o m (Maybe a)Source
if conversion is success, it consume an element. otherwise, it does not consume any elements.
convertMany :: MonadBaseControl IO m => (XmlElement -> m a) -> ConduitM XmlElement o m [a]Source
convertConduit :: MonadBaseControl IO m => (XmlElement -> m a) -> Conduit XmlElement m aSource
content :: (MonadThrow m, FromText t) => XmlElement -> m tSource
(.<) :: (MonadThrow m, FromText a) => XmlElement -> Text -> m aSource
the operator like aeson's (.:).
:: MonadThrow m | |
=> Text | tag name |
-> (XmlElement -> m a) | conversion function |
-> XmlElement | element |
-> m a |
This function throws error if the result of elementM
is Nothing.
:: MonadThrow m | |
=> Text | tag name |
-> (XmlElement -> m a) | Conversion function |
-> XmlElement | element |
-> m (Maybe a) |
'elementM conv name el' return Nothing if el
doesn't have any elements named name. otherwise, return 'Just a'.
:: MonadThrow m | |
=> Text | name of sets |
-> Text | name of item |
-> (XmlElement -> m a) | convert function |
-> XmlElement | element |
-> m [a] |