我的html代码如下:
<html>
......
<div.....>
<div..>
<ul class="class1">
<li><div class="class2"><a href="link1">text1</a>...</div><li>
<li><div class="class2"><a href="link2">text2</a>...</div><li>
<li><div class="class2"><a href="link3">text3</a>...</div><li><li>
<div class="class2"><a href="link4">text4</a>...</div><li>
</ul>
</div>
<div class="n">
<a href="nextlink">Next Page »</a>
</div>
</div>
.....
</html>
我需要从这个html()
生成一个json。
{"headings":[{"name":"text1","value":"link1"},{"name":"text2","value":"link2"},
{"name":"text3","value":"link3"}{"name":"text4","value":"link4"}],"nextpage":"nextlink"}