Maintainer | Henning Guenther |
---|
Helper functions to use a Parsec-Parser for XML documents.
- type XMLParser a = GenParser (Content Posn) () a
- anyContent :: XMLParser (Content Posn)
- content :: (Content Posn -> Maybe a) -> XMLParser a
- element :: XMLParser (Element Posn)
- text :: XMLParser String
- namedElement :: String -> XMLParser [Content Posn]
- namedElementWithAttrs :: String -> XMLParser ([Attribute], [Content Posn])
- stringElement :: String -> XMLParser String
- recurse :: XMLParser a -> [Content Posn] -> XMLParser a
- recurseElements :: XMLParser a -> [Content Posn] -> XMLParser a
Documentation
anyContent :: XMLParser (Content Posn)Source
Accepts any content.
namedElement :: String -> XMLParser [Content Posn]Source
As namedElementWithAttrs
, ony that the attributes are ignored.
namedElementWithAttrs :: String -> XMLParser ([Attribute], [Content Posn])Source
Parses an element with given name. Returns the xml Attribute
s.
stringElement :: String -> XMLParser StringSource
Parses an element with a given name. The text content is returned.