Copyright | (c) Galois Inc. 2007 (c) Herbert Valerio Riedel 2019 |
---|---|
License | BSD-3-Clause AND GPL-3.0-or-later |
Safe Haskell | Safe |
Language | Haskell2010 |
Synopsis
- strContent :: Element -> Text
- onlyElems :: [Content] -> [Element]
- elChildren :: Element -> [Element]
- onlyText :: [Content] -> [CData]
- findChildren :: QName -> Element -> [Element]
- filterChildren :: (Element -> Bool) -> Element -> [Element]
- filterChildrenName :: (QName -> Bool) -> Element -> [Element]
- findChild :: QName -> Element -> Maybe Element
- filterChild :: (Element -> Bool) -> Element -> Maybe Element
- filterChildName :: (QName -> Bool) -> Element -> Maybe Element
- findElement :: QName -> Element -> Maybe Element
- filterElement :: (Element -> Bool) -> Element -> Maybe Element
- filterElementName :: (QName -> Bool) -> Element -> Maybe Element
- findElements :: QName -> Element -> [Element]
- filterElements :: (Element -> Bool) -> Element -> [Element]
- filterElementsName :: (QName -> Bool) -> Element -> [Element]
- findAttr :: QName -> Element -> Maybe Text
- lookupAttr :: QName -> [Attr] -> Maybe Text
- lookupAttrBy :: (QName -> Bool) -> [Attr] -> Maybe Text
- findAttrBy :: (QName -> Bool) -> Element -> Maybe Text
Documentation
strContent :: Element -> Text Source #
Get the text value of an XML element. This function ignores non-text elements, and concatenates all text elements.
elChildren :: Element -> [Element] Source #
Select only the elements from a parent.
findChildren :: QName -> Element -> [Element] Source #
Find all immediate children with the given name.
filterChildren :: (Element -> Bool) -> Element -> [Element] Source #
Filter all immediate children wrt a given predicate.
filterChildrenName :: (QName -> Bool) -> Element -> [Element] Source #
Filter all immediate children wrt a given predicate over their names.
filterChild :: (Element -> Bool) -> Element -> Maybe Element Source #
Find an immediate child with the given name.
filterChildName :: (QName -> Bool) -> Element -> Maybe Element Source #
Find an immediate child with name matching a predicate.
findElement :: QName -> Element -> Maybe Element Source #
Find the left-most occurrence of an element matching given name.
filterElement :: (Element -> Bool) -> Element -> Maybe Element Source #
Filter the left-most occurrence of an element wrt. given predicate.
filterElementName :: (QName -> Bool) -> Element -> Maybe Element Source #
Filter the left-most occurrence of an element wrt. given predicate.
findElements :: QName -> Element -> [Element] Source #
Find all non-nested occurances of an element. (i.e., once we have found an element, we do not search for more occurances among the element's children).
filterElements :: (Element -> Bool) -> Element -> [Element] Source #
Find all non-nested occurrences of an element wrt. given predicate. (i.e., once we have found an element, we do not search for more occurances among the element's children).
filterElementsName :: (QName -> Bool) -> Element -> [Element] Source #
Find all non-nested occurences of an element wrt a predicate over element names. (i.e., once we have found an element, we do not search for more occurances among the element's children).