我正在使用以下代码块来读取XML数据
public async Task<IHttpActionResult> PostPurchaseOrder(HttpRequestMessage request)
{
XmlDocument document = new XmlDocument();
document.Load(request.Content.ReadAsStreamAsync().Result);
}
但在XML数据中使用&amp;,$,#等特殊字符时面临问题
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "xml.cxml.org/schemas/cXML/1.2.008/cXML.dtd">;
<cXML timestamp="2017-04-06T05:44:31-04:00" version="1.2.0025"
payloadID="ddae78e3-20b0-4f9d-91b8-7ca854f27568" xml:lang="en-US">
<Header> <From> <Credential domain="NetworkId">
<Identity>FakeIdentity & &</Identity>
</Credential> </From>
</cXML>