By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,581 Members | 2,007 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,581 IT Pros & Developers. It's quick & easy.

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

P: n/a
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?
Aug 11 '08 #1
Share this Question
Share on Google+
8 Replies


P: n/a
Greg C. wrote:
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?

--

Martin Honnen
http://JavaScript.FAQTs.com/
Aug 11 '08 #2

P: n/a
On Aug 11, 10:43*am, Martin Honnen <mahotr...@yahoo.dewrote:
Greg C. wrote:
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]
* * *&lt;BR&gt;&quot;&lt;a target=&quot;_blank&quot; href=&quot;http://
forumserve ...
So it's the "&lt;BR&gt;" 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?

--

* * * * Martin Honnen
* * * *http://JavaScript.FAQTs.com/

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

The validator is: http://www.feedvalidator.org
Aug 11 '08 #3

P: n/a
Greg C. wrote:
The feed is: http://greg.ca/facebook-feed/
What is
&lt;!BR&gt;&lt;!BR&gt;
supposed to be? That exclamation mark does not seem to belong in there.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Aug 11 '08 #4

P: n/a
On Aug 11, 11:12*am, Martin Honnen <mahotr...@yahoo.dewrote:
Greg C. wrote:
The feed is:http://greg.ca/facebook-feed/

What is
* *&lt;!BR&gt;&lt;!BR&gt;
supposed to be? That exclamation mark does not seem to belong in there.

--

* * * * Martin Honnen
* * * *http://JavaScript.FAQTs.com/
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.
Aug 11 '08 #5

P: n/a
On Aug 11, 11:46*am, "Greg C." <greg...@gmail.comwrote:
On Aug 11, 11:12*am, Martin Honnen <mahotr...@yahoo.dewrote:
Greg C. wrote:
The feed is:http://greg.ca/facebook-feed/
What is
* *&lt;!BR&gt;&lt;!BR&gt;
supposed to be? That exclamation mark does not seem to belong in there.
--
* * * * Martin Honnen
* * * *http://JavaScript.FAQTs.com/

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!
Aug 11 '08 #6

P: n/a
Greg C. wrote:
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.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Aug 11 '08 #7

P: n/a
On Aug 11, 11:53*am, Martin Honnen <mahotr...@yahoo.dewrote:
Greg C. wrote:
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.

--

* * * * Martin Honnen
* * * *http://JavaScript.FAQTs.com/
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
Aug 11 '08 #8

P: n/a
On 11 Aug, 17:02, "Greg C." <greg...@gmail.comwrote:
On Aug 11, 11:53*am, Martin Honnen <mahotr...@yahoo.dewrote:
Greg C. wrote:
It's just a commented out <BR>, ie <!BR>, so that it doesn't actually
render.

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
Aug 21 '08 #9

This discussion thread is closed

Replies have been disabled for this discussion.