2
我想采用solr响应xml并加载自定义集合。使用XDocument解析xml,solr结果
我想这是做XDocument的方式,因为我需要学习LINQ到XML。
所以XML看起来像:
<response>
<lst>
</list>
<result ... >
<doc>
<arr name="cat">
</arr>
<str name="t1">text</str>
<str name="t2">text2</str>
<str name="t3">text3</str>
<float name="amount">35.99</float>
</doc>
<doc>
..
</doc>
</result>
</respones>
我的收藏:
List<Result> results = new List<Result>();
public class Result
{
string T1
string T2
string T3
decimal Amount
}
非常好,谢谢! – Blankman 2010-03-02 20:37:08