[Haskell-cafe] HXT: Replace an element with its text

Michael Orlitzky michael at orlitzky.com
Tue Jun 26 18:44:31 CEST 2012

On 06/26/12 05:15, Ivan Perez wrote:
> Hi,
>  You code fails because a link is not a node of kind Text, I think.
> What you want is to get the text from a child node of an anchor node.
> I think the following should work:

Yes, thank you. That makes sense now.

> process_link :: (ArrowXml a) => a XmlTree XmlTree
> process_link = getChildren >>> getText >>> mkText

This works!

More information about the Haskell-Cafe mailing list