Haskell:删除字符串中的html字符实体 [英] Haskell: Remove html character entities in a string

查看:87
本文介绍了Haskell:删除字符串中的html字符实体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个包含html字符实体(例如 等)的字符串,并将其替换为文字字符串字符.我通过Twitter的api获取数据,并且文本包含这些实体.任何人都知道现有的图书馆可以做到这一点吗?

I'm looking to take a string containing html character entities such as   etc and replace them with the literal string characters. I'm getting data via twitter's api and the text contains those entities. Anyone know of an existing library which does this?

感谢您的帮助!

推荐答案

关于黑客的Web.Encodings包看起来很有前途(decodeHtml函数):

The Web.Encodings package on hackage looks promising (the decodeHtml function):

http://hackage.haskell.org/packages/archive/web-encodings/0.3.0.2/doc/html/Web-Encodings.html

这篇关于Haskell:删除字符串中的html字符实体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆