Malcolm Dew-Jones (yf***@vtn1.victoria.tc.ca) wrote:
:
lk******@geocities.com wrote:
: : Can't get this RSS feed clean:
: :
http://www.whatisliberalism.com/pdsFiles/page2533.xml
: : Why is it dying?
: : Some users write posts in Microsoft Word, then copy and paste their
: : post to the web browser and paste it in and hit submit and create a
: : weblog entry. This is what I just did myself.
: : I've written a PHP function that I thought would clean this feed, it
: : goes through the whole feed one byte at a time, and makes sure every
: : byte has an ascii value between 32 and 126. I thought that might give
: : me some garbage characters but they'd all be safe for RSS.
: : No. The feed is still dying. How do I find out what entity is killing
: : it?
: First I would feed it through an xml validator. It should tell you where
: the xml goes wrong.
: It it fails that you know what's wrong. If it passes - well worry about
: that after the first test.
In fact I realized I had a validator in "easy reach" so I used it on the
above url. I got
XML error: undefined entity, at line 22, column 23535
Using my handy dandy editor, I have cut and pasted some text from around
the offending section.
<description>I've ...
that our activities as feminists â'' including the
^^^^^^^
ERROR
... of new ideas.</description>
You can see which entity is causing a problem. It fails on the first
error, so there could be other errors after that.
--
This programmer available for rent.