问题描述
我认为HXT是Haskell中的一个XML / HTML处理库,它具有非常灵活和强大的用于遍历和操纵箭头的DOM树的方法。但是,HXT似乎只有DOM节点内容的字符串表示。
是否可以使用ByteString或Text for HXT?由于我在Yesod中使用HXT,因此主要使用Text,所以文本是首选。
HXT和HaXml都不支持字节串或文本,但如果您使用Yesod,则应该使用和。
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吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!