xml字符串转为XmlDocument

前端之家收集整理的这篇文章主要介绍了xml字符串转为XmlDocument前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
string xml = "<xml><logistics_express_get_respose><express_detail><company_code><![CDATA[ZTO]]></company_code>"; xml += "<express_no><![CDATA[201001038546]]></express_no>"; xml += "<trace_list>"; xml += "<transit_step_info><status_time><![CDATA[2011-06-04 21:21:00]]></status_time><status_desc><![CDATA[广州华都 派件已签收,签收人是 杨婉清]]></status_desc></transit_step_info>"; xml += "<transit_step_info><status_time><![CDATA[2011-06-04 21:21:00]]></status_time><status_desc><![CDATA[上海浦东新区中转站]]></status_desc></transit_step_info>"; xml += " </trace_list><status><![CDATA[对方已签收]]></status>"; xml += "</express_detail></logistics_express_get_respose></xml>"; System.Xml.XmlDocument DOM = new System.Xml.XmlDocument(); DOM.LoadXml(xml);

猜你在找的XML相关文章