KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > syndication > io > impl > RSS20Parser


1 /*
2  * Copyright 2004 Sun Microsystems, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */

17 package com.sun.syndication.io.impl;
18
19 import com.sun.syndication.feed.rss.Description;
20 import org.jdom.Element;
21
22 /**
23  */

24 public class RSS20Parser extends RSS094Parser {
25
26     public RSS20Parser() {
27         this("rss_2.0");
28     }
29
30     protected RSS20Parser(String JavaDoc type) {
31         super(type);
32     }
33
34     protected String JavaDoc getRSSVersion() {
35             return "2.0";
36     }
37
38     protected boolean isHourFormat24(Element rssRoot) {
39         return false;
40     }
41
42     protected Description parseItemDescription(Element rssRoot,Element eDesc) {
43         Description desc = super.parseItemDescription(rssRoot,eDesc);
44         desc.setType("text/plain"); // JDOM unescapes it, not sure if it's always OK
45
return desc;
46     }
47
48 }
49
Popular Tags