hxt

Haskell HXT for extracting a list of values

I'm trying to figure my way through HXT with XPath and arrows at the same time and I'm completely stuck on how to think through this problem. I've got the following HTML: <div> <div class="c1">a</div> <div class="c2">b</div> <div class="c3">123</div> <div class="c4">234</div> </div> which I've extracted into an HXT XmlTree. What I...

HXT -- what is "deep" ?

I'm putting in a lot of time trying to figure out how to use HXT. I keep coming against examples using deep. What does deep do? For example, this code has the following: atTag tag = deep (isElem >>> hasName tag) Another example: -- case-insensitive tag matching atTagCase tag = deep (isElem >>> hasNameWith ((== tag') . upper . localP...

Running Haskell HXT outside of IO?

All the examples I've seen so far using the Haskell XML toolkit, HXT, uses runX to execute the parser. runX runs inside the IO monad. Is there a way of using this XML parser outside of IO? Seems to be a pure operation to me, don't understand why I'm forced to be inside IO. ...