相关疑难解决方法(0)

Haskell HXT用于提取值列表

我试图用XPath和箭头同时通过HXT来解决问题,我完全坚持如何思考这个问题.我有以下HTML:

<div>
<div class="c1">a</div> 
<div class="c2">b</div> 
<div class="c3">123</div> 
<div class="c4">234</div> 
</div>
Run Code Online (Sandbox Code Playgroud)

我已经提取到HXT XmlTree中了.我想做的是定义一个函数(我想?):

getValues :: [String] -> IOSArrow Xmltree [(String, String)]
Run Code Online (Sandbox Code Playgroud)

哪个,如果用作getValues ["c1", "c2", "c3", "c4"],将得到我:

[("c1", "a"), ("c2", "b"), ("c3", "123"), ("c4", "234")]
Run Code Online (Sandbox Code Playgroud)

请帮忙?

xml haskell hxt

5
推荐指数
1
解决办法
1115
查看次数

标签 统计

haskell ×1

hxt ×1

xml ×1