2016-07-13 2 views
0

당신은 내가이 문제를 해결하는 방법을 알려 주시기 바랍니다 수 :&가 포함 된 XML 문서를로드 할 수 없습니다. 기업

XML 파일 :

<ref ref-type="sectiona">sdsadsd <email>[email protected]</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> 

내 코드 :

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

예외 선언되지 않은 엔티티

참조 'commat'. 선 (35), 위치 (65)

답변

0

사용이 XML 노드

유효하지 않은 값을 포함
<ref ref-type="sectiona"><![CDATA[sdsadsd <email>[email protected]</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> 

노드는

+0

useing없이 해결 <![CDATA[....]]>를 이스케이프해야합니다. ...]]> – kavyah

+0

안녕하세요, mi를 "xml 파일에서 CDATA를 동적으로 업데이트하는 방법 & 우리가"& commat; xml 노드에서 C# – kavyah

관련 문제