hexpat-0.19.10: XML parser/formatter based on expat

Safe HaskellSafe-Infered

Text.XML.Expat.Proc

Description

This module ported from Text.XML.Light.Proc

Synopsis

Documentation

onlyElems :: NodeClass n c => c (n c tag text) -> c (n c tag text)Source

Select only the elements from a list of XML content.

onlyText :: (NodeClass n c, Monoid text) => c (n c tag text) -> c textSource

Select only the text from a list of XML content.

findChildren :: (NodeClass n c, Eq tag, Monoid tag) => tag -> n c tag text -> c (n c tag text)Source

Find all immediate children with the given name.

filterChildren :: NodeClass n c => (n c tag text -> Bool) -> n c tag text -> c (n c tag text)Source

Filter all immediate children wrt a given predicate.

filterChildrenName :: (NodeClass n c, Monoid tag) => (tag -> Bool) -> n c tag text -> c (n c tag text)Source

Filter all immediate children wrt a given predicate over their names.

findChild :: (NodeClass n [], GenericXMLString tag) => tag -> n [] tag text -> Maybe (n [] tag text)Source

Find an immediate child with the given name.

filterChild :: NodeClass n [] => (n [] tag text -> Bool) -> n [] tag text -> Maybe (n [] tag text)Source

Find an immediate child with the given name.

filterChildName :: (NodeClass n [], Monoid tag) => (tag -> Bool) -> n [] tag text -> Maybe (n [] tag text)Source

Find an immediate child with name matching a predicate.

findElement :: (NodeClass n [], Eq tag, Monoid tag) => tag -> n [] tag text -> Maybe (n [] tag text)Source

Find the left-most occurrence of an element matching given name.

filterElement :: NodeClass n [] => (n [] tag text -> Bool) -> n [] tag text -> Maybe (n [] tag text)Source

Filter the left-most occurrence of an element wrt. given predicate.

filterElementName :: (NodeClass n [], Monoid tag) => (tag -> Bool) -> n [] tag text -> Maybe (n [] tag text)Source

Filter the left-most occurrence of an element wrt. given predicate.

findElements :: (NodeClass n c, Eq tag, Monoid tag) => tag -> n c tag text -> c (n c tag text)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 :: NodeClass n c => (n c tag text -> Bool) -> n c tag text -> c (n c tag text)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 :: (NodeClass n c, Monoid tag) => (tag -> Bool) -> n c tag text -> c (n c tag text)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).