Donate Share

jRSS - Simple Java RSS Feed Generator

Tracker: Bugs

7 error in xml for Channel.Image - ID: 1708392
Last Update: Comment added ( sf-robot )

Message body follows:

Hello Henrique,


Thank you for developing the Java RSS Generator. While using
it I found out there's an error in the generated xml for the
channel image.

I used this pseudo code the create a channel image:

Channel.Image image = channel.new Image("url goes here",
"title goes here", "link goes here");
channel.setImage(image);

This is the generated xml:

<image><url>url goes heretitle goes herelink goes
here</url><title/><link/><width>88</width><height>31</height></image>

Notice the element 'url' contains concatenated values for
url, title and link. The actual elements 'title' and 'link'
are empty.

Hope you will fix this 'cause I'd like to use the feature.

Thanks, Tom


Henrique Andrade Viecili ( viecili ) - 2007-04-26 21:48

7

Closed

None

Henrique Andrade Viecili

None

None

Public


Comments ( 3 )




Date: 2007-11-14 03:20
Sender: sf-robotSourceForge.net Site Admin


This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).


Date: 2007-10-30 03:56
Sender: valcar


This still appears to be a bug in the code. I have fixed and built myself
based on the comment below but getting the fix in would be good.


Date: 2007-04-26 21:50
Sender: vieciliProject Admin


Message body follows:

Hi Henrique,

I looked into the source of RSSFeedGeneratorImpl. This is
the relevant piece for generating the image xml:

Channel.Image image = channel.getImage();
Element elem = doc.createElement("image");
Text urlct = doc.createTextNode(image.getUrl());
Element url = doc.createElement("url");
url.appendChild(urlct);
elem.appendChild(url);
Text titlect = doc.createTextNode(image.getTitle());
Element title = doc.createElement("title");
url.appendChild(titlect);
elem.appendChild(title);
Text linkct = doc.createTextNode(image.getLink());
Element link = doc.createElement("link");
url.appendChild(linkct);
elem.appendChild(link);

I think you made an error copy-pasting. Please change
'url.appendChild(titlect);' to 'title.appendChild(titlect);'
and 'url.appendChild(linkct);' to 'link.appendChild(linkct);'.

Bye, Tom


Log in to comment.

Attached File

No Files Currently Attached

Changes ( 6 )

Field Old Value Date By
status_id Pending 2007-11-14 03:20 sf-robot
close_date 2007-10-30 23:52 2007-11-14 03:20 sf-robot
status_id Open 2007-10-30 23:52 viecili
close_date - 2007-10-30 23:52 viecili
priority 5 2007-04-26 21:50 viecili
assigned_to nobody 2007-04-26 21:50 viecili