0

Can you please let me know how to resolve this problem:

XML file:

<ref ref-type="sectiona">sdsadsd <email>EffectiveHealthCare@ahrq.hhs.gov</email>sdasd  &commat; Sec asdd</ref>
<ref ref-type="sec">test Sec</ref>
<ref ref-type="sec">seesdasdasd <email>EffectiveHealthCare &commat; dasdasdasd</email>asdad Sec</ref>
<ref ref-type="sec"> Sec</ref>

My code:

XmlDocument xmlDocFile = new XmlDocument();
xmlDocFile.Load("xmlfile");

Exception

Reference to undeclared entity 'commat'. Line 35, position 65

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
kavyah
  • 3
  • 3

1 Answers1

0

Use this xml nodes

<ref ref-type="sectiona"><![CDATA[sdsadsd <email>EffectiveHealthCare@ahrq.hhs.gov</email>sdasd  &commat; Sec asdd]]></ref>
<ref ref-type="sec">test Sec</ref>
<ref ref-type="sec"> Sec</ref>
<ref ref-type="sec"><![CDATA[seesdasdasd <email>EffectiveHealthCare &commat; dasdasdasd</email>asdad Sec]]></ref>

nodes that contain invalid values must be escaped <![CDATA[....]]>

Dmitry
  • 165
  • 7