我的 XML 看起来像这样:
<order>
<order_number>1N</order_number>
<execution_data>
<exe_date>11/01/2011</exe_date>
<exe_name>Joe</exe_name>
</execution_data>
<execution_data>
<exe_date>12/01/2011</exe_date>
<exe_name>Mike</exe_name>
</execution_data>
<execution_data>
<exe_date>8/01/2011</exe_date>
<exe_name>Steve</exe_name>
</execution_data>
</order>
<order>
<order_number>2N</order_number>
<execution_data>
<exe_date>11/01/2011</exe_date>
<exe_name>Rob</exe_name>
</execution_data>
<execution_data>
<exe_date>12/01/2011</exe_date>
<exe_name>Marko</exe_name>
</execution_data>
<execution_data>
<exe_date>8/01/2011</exe_date>
<exe_name>Sam</exe_name>
</execution_data>
</order>
<order>
<order_number>3N</order_number>
<execution_data>
<exe_date>11/01/2011</exe_date>
<exe_name>Nick</exe_name>
</execution_data>
<execution_data>
<exe_date>12/01/2011</exe_date>
<exe_name>Ashley</exe_name>
</execution_data>
<execution_data>
<exe_date>8/01/2011</exe_date>
<exe_name>Marc</exe_name>
</execution_data>
</order>
public class ExecutionItem
{
public string Date {get;set;}
public string Name {get;set;}
}
public class Response
{
public List<ExecutionItem> ExecutionItems{get;set;}
}
如何选择一个order_number
等于的订单,1N
然后execution_data
使用 LINQ 从该订单中获取所有内容?