【发布时间】:2011-08-22 22:12:58
【问题描述】:
我有以下需要在 C# 中解析的 XML:
<data>
<customer_id><![CDATA[1414301]]></customer_id>
<last_modified_date><![CDATA[2011-08-14 11:58:58]]></last_modified_date>
<customer_first_name><![CDATA[joe]]></customer_first_name>
<customer_last_name><![CDATA[blow]]></customer_last_name>
</data>
放入一个名为 Result 的对象中
public class Result
{
public int customer_id;
public string customer_first_name;
public string customer_last_name;
}
我要确定的一件事是如何摆脱
<![CDATA[]]
然后解析出常规值。
将此 XML 转换为支持上述 CDATA 语法的上述对象的最佳方法是什么
【问题讨论】:
标签: c# xml parsing c#-4.0 xml-parsing