在Haskell的HXT上可以使用Text或ByteString吗? [英] Is it possible to use Text or ByteString on HXT in Haskell?
问题描述
http://adit.io/posts/2012-04-14-working_with_HTML_in_haskell.html
但是,HXT似乎只有DOM节点内容的字符串表示。
http://hackage.haskell.org/packages/archive/hxt/9.1.6/doc/html/Text-XML-HXT-DOM-TypeDefs.html#t:XNode
是否可以使用ByteString或Text for HXT?由于我在Yesod中使用HXT,因此主要使用Text,所以文本是首选。
HXT和HaXml都不支持字节串或文本,但如果您使用Yesod,则应该使用 xml-conduit 和无论如何,html-conduit 。
I think HXT, a XML/HTML processing library in Haskell, has really flexible and powerful methods for traversing and manipulating DOM trees by Arrows. http://adit.io/posts/2012-04-14-working_with_HTML_in_haskell.html
It seems, however, HXT has only String representation for DOM node contents. http://hackage.haskell.org/packages/archive/hxt/9.1.6/doc/html/Text-XML-HXT-DOM-TypeDefs.html#t:XNode
Is it possible to use either of ByteString or Text for HXT? Text is preferred since I am using HXT with Yesod, which seems to mainly use Text.
Neither HXT nor HaXml appear to support either bytestring or text, but if you are working with Yesod you should probably use xml-conduit and html-conduit anyway.
这篇关于在Haskell的HXT上可以使用Text或ByteString吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!