Annoying Problem Trying To Validate An XML Feed. Losing My Mind!Please Help!

G

Greg C.

I tried tackling this problem about 6 months ago, but after going
almost completely insane I gave up, since my news feed seemed to
display just fine anyways. However, in an effort to have my feeds in
complete compliance, I am trying to deal with the problem again.

When I try to validate my feeds I get the following error:

Line 17, column 0: Invalid HTML: unknown declaration: u'BR', at line
5, column 124 (277 occurrences) [help]
<BR>"<a target="_blank" href="http://
forumserve ...

So it's the "<BR>" that's causing the problem.

I went through the help and tried what it recommends, using & to
escape the code (like so: <BR>), but then not only do I
still get this error, but none of my actual web pages that display
this same content work anymore either.

Are there any experts out there that have run into this before?
 
M

Martin Honnen

Greg said:
I tried tackling this problem about 6 months ago, but after going
almost completely insane I gave up, since my news feed seemed to
display just fine anyways. However, in an effort to have my feeds in
complete compliance, I am trying to deal with the problem again.

When I try to validate my feeds I get the following error:

Line 17, column 0: Invalid HTML: unknown declaration: u'BR', at line
5, column 124 (277 occurrences) [help]
<BR>"<a target="_blank" href="http://
forumserve ...

So it's the "<BR>" that's causing the problem.

Can you post the URL to a minimal but complete feed that shows the
problem and also post the URL of the feed validator you use?
 
G

Greg C.

Greg said:
I tried tackling this problem about 6 months ago, but after going
almost completely insane I gave up, since my news feed seemed to
display just fine anyways. However, in an effort to have my feeds in
complete compliance, I am trying to deal with the problem again.
When I try to validate my feeds I get the following error:
Line 17, column 0: Invalid HTML: unknown declaration: u'BR', at line
5, column 124 (277 occurrences) [help]
     <BR>"<a target="_blank" href="http://
forumserve ...
So it's the "<BR>" that's causing the problem.

Can you post the URL to a minimal but complete feed that shows the
problem and also post the URL of the feed validator you use?


The feed is: http://greg.ca/facebook-feed/

The validator is: http://www.feedvalidator.org
 
G

Greg C.

What is
   <!BR><!BR>
supposed to be? That exclamation mark does not seem to belong in there.

It's just a commented out <BR>, ie <!BR>, so that it doesn't actually
render.

Oh dear god, please tell me that's not what's causing this problem.
 
G

Greg C.

It's just a commented out <BR>, ie <!BR>, so that it doesn't actually
render.

Oh dear god, please tell me that's not what's causing this problem.

WOW!! After all the time I put into this, and all the fixes/
workarounds I tried, that WAS the problem!! Unbelievable.

It's amazing how a simple question can make you start thinking on a
totally different path.

Thank you so much Martin!
 
M

Martin Honnen

Greg said:
It's just a commented out <BR>, ie <!BR>, so that it doesn't actually
render.

Is that proper SGML/HTML comment syntax in your view, or just some
syntax you made up?
Try whether removing that part makes the validator happy, to me it looks
like the most probably cause of that warning.
 
G

Greg C.

Is that proper SGML/HTML comment syntax in your view, or just some
syntax you made up?
Try whether removing that part makes the validator happy, to me it looks
like the most probably cause of that warning.

I'm not sure if it's proper syntax, but it's worked for years so I've
always done it for testing purposes (ie. if I want to see how
something works without an HTML tag but I don't want to have to
actually take it out and then put it back in after the test). I've
used this for as long as I can remember and have never had a problem
before, but I guess now that it's being processed through XML (my
first attempt at XML/news feeds), it does in fact cause issues.

I removed those from the RSS generation code, changed the limit from 5
posts to ALL posts for that feed, and now absolutely everything
validates. I can't believe that's what the problem was... I feel like
such a moron :p
 
U

usenet

I'm not sure if it's proper syntax, but it's worked for years so I've
always done it for testing purposes (ie. if I want to see how
something works without an HTML tag but I don't want to have to
actually take it out and then put it back in after the test). I've
used this for as long as I can remember and have never had a problem
before, but I guess now that it's being processed through XML (my
first attempt at XML/news feeds), it does in fact cause issues.

FWIW I've often commented out HTML tags using something like <xBR>.
The x obviously turns it into an unknown tag which is ignored.

The full commenting out would naturally require something like: <!--
BR-->

HTH,

Pete Cordell
Codalogic Ltd
Interface XML to C++ the easy way using XML C++
data binding to convert XSD schemas to C++ classes.
Visit http://www.codalogic.com/lmx/ for more info
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top