
On 15/02/14 21:25, Philippe Sismondi wrote:
Greetings. I am trying to move some very old code from using HaXml to HXT. This is experimental; I have reasons which I think are not relevant to this post.
The website that purports to document HXT has broken links. This is Uwe Schmidt's website. I have emailed Dr. Schmidt. Meanwhile, can anyone elucidate the use of readDocument with its withCurl and withHTTP options? What may be passed in the list to e.g. withHTTP?
- Phil - _______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners
Why don't you use the documentation on Hackage? Here[1] is your readDocument. It mentions the withCurl option and how to use it. As it points out, the withCurl comes from hxt-curl and the relevant page is at [2]. As you can see, it takes Attributes which is just a list of key-value pairs. I'm sure you can keep clicking on the links and find out what it is you need to pass to it. It's the same case when looking at withHTTP. Word of warning about HXT, it will blow up in your face if you give it bigger XML files: I found ~30MB to be the limit for a 4GB machine. It's great for smaller files however. See [3] for that issue and [4] for other issues that you might want to view. [1]: http://hackage.haskell.org/package/hxt-9.3.1.3/docs/Text-XML-HXT-Arrow-ReadD... [2]: http://hackage.haskell.org/package/hxt-curl-9.1.1/docs/Text-XML-HXT-Curl.htm... [3]: https://github.com/UweSchmidt/hxt/issues/9 [4]: https://github.com/UweSchmidt/hxt/issues -- Mateusz K.