2016-11-17 3 views
0

XML 구문 분석 오류 : 88 : 805 : 유효성을 검사 할 때 형식이 올바르지 않습니다 (토큰이 유효하지 않습니다). https://validator.w3.org/XML 구문 분석 오류 : <unknown> : 88 : 805 : 형식이 올바르지 않음 (토큰이 유효하지 않음)

동일한 이유를 찾을 수 없습니다. 오류가 말한대로 결함으로 표시됩니다 코드는 다음과 같이

<content:encoded><![CDATA[<p>It&rsquo;s a pleasure to share some of the recipes in <a href="https://www.example.com/abc-dss-Life-as-Radiant-Boundless/dp/0814437079/ref=sr_1_1?ie=UTF8&amp;qid=1467207110&amp;sr=8-1&amp;keywords=a+plant+based+life"><em>A ad-as</em></a>with you! I finished perfecting this recipe the week that NASA&rsquo;s Kepler Mission found a new Earth-like planet, 452b, so I named it in honor of the discovery. If I were an astronaut on a years-long space mission and could only bring one food with me, this lasagna would definitely be a top contender. Other great features of this recipe? Neither the noodles nor the filling need to be precooked&mdash;after some quick chopping, which you can do in a food processor, this dish will be ready to pop in the oven.For the full sampler of recipes with delicious images, <a href="http://www.example.net/abc/a-abc-abc-abc-abc" target="_blank">click here to see the slideshow</a>. <strong>Ingredients: </strong></p> 

답변

2

아래 주어, 당신의 XML이 잘 형성되지 않는다. 그것을 해결하기 위해

는 다음과 같이 변경합니다

  1. 가 사용 content 네임 스페이스 접두사를 정의합니다.
  2. ^K 문자를 삭제하십시오.
  3. CDATA 섹션을 닫습니다.
  4. content:encoded 요소를 닫습니다. 그것은 지금 잘 형성된다

    <content:encoded xmlns:content="http://example.com/content"> 
        <![CDATA[<p>It&rsquo;s a pleasure to share some of the recipes in <a 
        href="https://www.example.com/abc-dss-Life-as-Radiant-Boundless/dp/0814437079/ref=sr_1_1?ie=UTF8&amp;qid=1467207110&amp;sr=8-1&amp;keywords=a+plant+based+life"> 
        <em>A ad-as</em> </a>with you! I finished perfecting this recipe the 
        week that NASA&rsquo;s Kepler Mission found a new Earth-like planet, 
        452b, so I named it in honor of the discovery. If I were an 
        astronaut on a years-long space mission and could only bring one 
        food with me, this lasagna would definitely be a top 
        contender. Other great features of this recipe? Neither the noodles 
        nor the filling need to be precooked&mdash;after some quick 
        chopping, which you can do in a food processor, this dish will be 
        ready to pop in the oven.For the full sampler of recipes with 
        delicious images, <a 
        href="http://www.example.net/abc/a-abc-abc-abc-abc" 
        target="_blank">click here to see the 
        slideshow</a>. <strong>Ingredients: </strong> </p>]]> 
    </content:encoded> 
    

    :

여기에 적용되는 다음과 같은 수정하여 XML입니다.

+0

내 문제는 달랐지만 제안한 구조가 많이 도움이되었습니다. 내 문제는 CDATA 섹션이''태그에 내장되어 있다는 것이었다. URL의 일부인 char 시퀀스 인'--_'는 RSS 피드가 CDATA 섹션 내에 있었지만 무효로 렌더링되었습니다. 어쨌든 감사합니다! – helvete

관련 문제