dom-parser-3.2.0: Simple monadic DOM parser
Safe HaskellSafe-Inferred
LanguageHaskell2010

Text.XML.DOM.Parser.Attributes

Synopsis

Documentation

parseAttribute Source #

Arguments

:: Monad m 
=> NameMatcher

Attribute name

-> (Text -> Either Text a)

Attribute content parser

-> DomParserT Identity m a 

Parses attribute with given name, throws error if attribute is not found.

Since: 1.0.0

parseAttributeMaybe Source #

Arguments

:: Monad m 
=> NameMatcher

Attribute name

-> (Text -> Either Text a)

Attribute content parser

-> DomParserT Identity m (Maybe a) 

Parses attribute with given name. Returns Nothing if attribute is not found.

Since: 1.0.0

getCurrentAttributes :: Monad m => DomParserT Identity m (Map Name Text) Source #

Retuns map of attributes of current element

Since: 1.0.0

getCurrentAttribute :: Monad m => NameMatcher -> DomParserT Identity m (Maybe Text) Source #

Returns element with given name or Nothing

Since: 1.0.0