xml-1.3.14: A simple XML library.

Copyright(c) Galois, Inc. 2007
LicenseBSD3
MaintainerIavor S. Diatchki <diatchki@galois.com>
Stabilityprovisional
Portability
Safe HaskellSafe-Inferred
LanguageHaskell98

Text.XML.Light.Proc

Description

 

Synopsis

Documentation

strContent :: Element -> String Source

Get the text value of an XML element. This function ignores non-text elements, and concatenates all text elements.

onlyElems :: [Content] -> [Element] Source

Select only the elements from a list of XML content.

elChildren :: Element -> [Element] Source

Select only the elements from a parent.

onlyText :: [Content] -> [CData] Source

Select only the text from a list of XML content.

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.

findChild :: QName -> Element -> Maybe Element Source

Find an immediate child with the given name.

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).

findAttr :: QName -> Element -> Maybe String Source

Lookup the value of an attribute.

lookupAttr :: QName -> [Attr] -> Maybe String Source

Lookup attribute name from list.

lookupAttrBy :: (QName -> Bool) -> [Attr] -> Maybe String Source

Lookup the first attribute whose name satisfies the given predicate.

findAttrBy :: (QName -> Bool) -> Element -> Maybe String Source

Lookup the value of the first attribute whose name satisfies the given predicate.