0
votes

I've got my RSS feed in xml file which I can not edit. The problem is that some of the tags inside are empty or they contain other html tags such as <b></b>. I built my own JavaScript rss feed reader but it's not working unless I will get rid of all empty tags and all html tags. Any ideas?

Example 1 - which doesn't work:

/* ... */
<item>
<pubDate>04 Feb</pubDate>
<closeDate>11 Feb</closeDate>
<snappytitle></snappytitle>
<title><b>Web Developer</b></title>
<grade>4</grade>
</item>
/* ... */

Example 2 - which does work:

/* ... */
<item>
<pubDate>04 Feb</pubDate>
<closeDate>11 Feb</closeDate>

<title>Web Developer</title>
<grade>4</grade>
</item>
/* ... */
1
"Any ideas" for what? You need an XML sanitizer?Mike Daniels
you're approaching this from the wrong angle. You're asking "How can I fix this correct XML so I can read it in my broken XML reader?" when you should be asking "How can I fix my broken XML reader since it doesn't read this valid XML?" This better question also requires you to post your XML reading code.Samuel Neff
Well.. the thing is that I can not edit xml file as it's provided by the third party. To read this xml I am using modify version of the simple javaScript Ajax Feed reader which I found here I am note sure how to modify this script to still work even if some tags inside of the xml file are empty.. as per example I have before.daboja

1 Answers

0
votes

Well.. the thing is that I can not edit xml file as it's provided by the third party. To read this xml I am using modify version of the simple javaScript Ajax Feed reader which I found here

I am note sure how to modify this script to still work even if some tags inside of the xml file are empty.. as per example I have before.