Text.XML.Light.Helpers
Description
A set of useful helper functions for dealing with XML data.
- mapChildren :: String -> Element -> (Element -> Maybe a) -> Maybe [a]
- foldChildren :: String -> Element -> a -> (a -> Element -> Maybe a) -> Maybe a
- mapElements :: String -> Element -> (Element -> Maybe a) -> Maybe [a]
- foldElements :: String -> Element -> a -> (a -> Element -> Maybe a) -> Maybe a
- mapChildrenWithAttName :: String -> Element -> (Element -> Maybe a) -> Maybe [a]
- mapElementsWithAttName :: String -> Element -> (Element -> Maybe a) -> Maybe [a]
- foldChildrenWithAttName :: String -> Element -> a -> (a -> Element -> Maybe a) -> Maybe a
- foldElementsWithAttName :: String -> Element -> a -> (a -> Element -> Maybe a) -> Maybe a
- getChildData :: String -> Element -> Maybe String
- getElementData :: String -> Element -> Maybe String
- findChildWithAttName :: String -> Element -> Maybe Element
- findChildrenWithAttName :: String -> Element -> [Element]
- findElementWithAttName :: String -> Element -> Maybe Element
- findElementsWithAttName :: String -> Element -> [Element]
- elementHasNameAttr :: String -> Element -> Bool
- parseRows :: (Element -> Maybe a) -> Element -> Maybe [a]
Documentation
mapChildren :: String -> Element -> (Element -> Maybe a) -> Maybe [a]Source
Map the given function over the children of the given element with the given name.
foldChildren :: String -> Element -> a -> (a -> Element -> Maybe a) -> Maybe aSource
Fold the function over the children of the given element with the given name.
mapElements :: String -> Element -> (Element -> Maybe a) -> Maybe [a]Source
Map the given function over all subelements of the given element with the given name.
foldElements :: String -> Element -> a -> (a -> Element -> Maybe a) -> Maybe aSource
Fold the given function over the children of the given element with the given name.
mapChildrenWithAttName :: String -> Element -> (Element -> Maybe a) -> Maybe [a]Source
Map the given function over the children of the given element that have an attribute name matching the given string.
mapElementsWithAttName :: String -> Element -> (Element -> Maybe a) -> Maybe [a]Source
Map the given function over the subelements of the given element that have an attribute name matching the given string.
foldChildrenWithAttName :: String -> Element -> a -> (a -> Element -> Maybe a) -> Maybe aSource
Fold the given function over the children of the given element that have an attribute name matching the given string.
foldElementsWithAttName :: String -> Element -> a -> (a -> Element -> Maybe a) -> Maybe aSource
Fold the given function over the subelements of the given element that have an attribute name matching the given string.
getChildData :: String -> Element -> Maybe StringSource
Get the string contents of the child of the given element with the given name.
getElementData :: String -> Element -> Maybe StringSource
Get the string contents of the subelement of the given element with the given name.
findChildWithAttName :: String -> Element -> Maybe ElementSource
Find a child of the given element with that has an attribute name equal to the given string.
findChildrenWithAttName :: String -> Element -> [Element]Source
Find all the children of the given element that have an attribute name equal to the given string.
findElementWithAttName :: String -> Element -> Maybe ElementSource
Find a subelement of the given element that has an attribute name equal to the given string.
findElementsWithAttName :: String -> Element -> [Element]Source
Find all the subelements of the given element that have an attribute name equal to the given string.