Is it possible to use Text or ByteString on HXT in Haskell?

橙三吉。 提交于 2019-12-08 16:37:28

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/11382211/is-it-possible-to-use-text-or-bytestring-on-hxt-in-haskell

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!