1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package com.sun.syndication.io.impl;
18
19 import com.sun.syndication.feed.rss.Description;
20 import com.sun.syndication.feed.rss.Item;
21 import org.jdom.Attribute;
22 import org.jdom.Element;
23
24 /***
25 * Feed Generator for RSS 0.94
26 * <p/>
27 *
28 * @author Elaine Chien
29 *
30 */
31
32 public class RSS094Generator extends RSS093Generator {
33
34 public RSS094Generator() {
35 this("rss_0.94","0.94");
36 }
37
38 protected RSS094Generator(String feedType,String version) {
39 super(feedType,version);
40 }
41
42 protected void populateItem(Item item, Element eItem, int index) {
43 super.populateItem(item,eItem, index);
44
45 Description description = item.getDescription();
46 if (description!=null && description.getType()!=null) {
47 Element eDescription = eItem.getChild("description",getFeedNamespace());
48 eDescription.setAttribute(new Attribute("type",description.getType()));
49 }
50 eItem.removeChild("expirationDate",getFeedNamespace());
51 }
52
53 }