我有一个包含重音字符的 XML 属性:
<TestCase Name="Canadian Addresses - Test Case" Description="Canadian Addresses - Test Case" OnOff="True" NegativeTest="False" RollbackDB="False" Performance="False" PerformanceSummary="False" TimesToExecute="1">
<ProviderFacilitySearch_FindProviderFacility ProviderInfo="Dr Marc-André Kärcher Samuels Senior|10 Château du Feÿ Ave, North Building, North Sydney, NS B2A 3L7 CANADA" />
<ProviderFacilitySearch_ViewProviderFacility ProviderInfo="Dr Marc-André Kärcher Samuels Senior|10 Château du Feÿ Ave, North Building, North Sydney, NS B2A 3L7 CANADA" />
<ViewProvider_LocationName ExpectedLocationName="Kärcher Health Care" />
<ViewProvider_ServicingAddress ExpectedServicingAddress="10 Château du Feÿ Ave|Central Building|North Sydney, NS B2A 3L7|CANADA" />
<ViewProvider_ExpandMailingAddress NA="" />
<ViewProvider_MailingAddress ExpectedMailingAddress="10 Château du Feÿ Ave|Central Building|North Sydney, NS B2A 3L7|CANADA" />
<ViewProvider_ExpandBillingAddress NA="" />
<ViewProvider_BillingAddress ExpectedBillingAddress="10 Château du Feÿ Ave|Central Building|North Sydney, NS B2A 3L7|CANADA" />
<ViewProvider_Close NA="" />
<ProviderFacilitySearch_Cancel NA="" />
<UserLogout/>
</TestCase>
当我尝试使用 C# 代码读取此 XML 文件时,我得到:
5/8/2013 2:39:03 PM 错误:System.Xml.XmlException:给定编码中的字符无效。第 86 行,位置 74。在 System.Xml.XmlTextReaderImpl.Throw(String res, String arg) 在 System.Xml.XmlTextReaderImpl.Throw(Exception e) 在 System.Xml.XmlTextReaderImpl.InvalidCharRecovery(Int32& bytesCount, Int32& charsCount)
我什至无法使用 IE 打开页面。
有没有办法得到这个工作?