【发布时间】:2017-09-07 13:29:02
【问题描述】:
这是我需要用 C# 解析的无效 xml 响应, 我正在尝试为响应创建一个类,但收效甚微。
<Response service=\"RouteService\">
<Head>OK</Head>
<Body>
<RouteResponse mailno=\"070033764942\">
<Route accept_time=\"2017-03-23 10:57:13\"\taccept_address=\"United States\"\tremark=\"For Sign Info, please see 'AWB Info & POD' in our website\"\topcode=\"8000\"/>
<Route accept_time=\"2017-03-23 10:52:10\"\taccept_address=\"United States\"\tremark=\"Have been signed(MS.TT),Thank you for using SF, and looking forward to serving you again\"\topcode=\"80\"/>
<Route accept_time=\"2017-03-23 10:52:10\"\taccept_address=\"United States\"\tremark=\"Have been signed(MS.TT),Thank you for using SF, and looking forward to serving you again\"\topcode=\"80\"/>
<Route accept_time=\"2017-03-23 10:46:37\"\taccept_address=\"SHENZHEN CITY\"\tremark=\"S.F. Express has picked up the shipment\"\topcode=\"50\"/>
<Route accept_time=\"2017-03-23 10:46:37\"\taccept_address=\"SHENZHEN CITY\"\tremark=\"S.F. Express has picked up the shipment\"\topcode=\"50\"/>
</RouteResponse>
</Body>
【问题讨论】:
-
用
"替换所有\",用` `替换所有\t? -
修复生成无效xml的代码。
标签: c# xml parsing serialization