当我调用 XDocument.Save 它正在编码我的 html<br/>
标记时,有没有办法防止这种情况发生?
XDocument xDoc = new XDocument(new XElement("desc","jon skeet <br/> knows, the <br/> answer"));
xDoc.Save(Server.MapPath("~/tempUploads/encodeTest.xml"));
输出是:
<?xml version="1.0" encoding="utf-8"?>
<desc>jon skeet <br/> knows, the <br/> answer</desc>
我想要的输出:
<?xml version="1.0" encoding="utf-8"?>
<desc>jon skeet <br/> knows, the <br/> answer</desc>