harshal
harshal

Reputation: 10853

XML parsing error: <unknown>:88:805: not well-formed (invalid token)

I am getting an error :XML parsing error: :88:805: not well-formed (invalid token) when I try to validate using https://validator.w3.org/

I am unable to find the reason for the same. code which is marked as defective is as given below

<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>

Upvotes: 0

Views: 1056

Answers (1)

kjhughes
kjhughes

Reputation: 111521

As the error says, your XML is not well-formed.

To fix it, make the following changes:

  1. Define the used content namespace prefix.
  2. Delete the ^K character.
  3. Close the CDATA section.
  4. Close the content:encoded element.

Here is your XML with the following fixes applied:

<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>

It is now well-formed.

Upvotes: 2

Related Questions