1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.commons.feedparser;
18
19 import java.io.InputStream;
20
21 /***
22 * This FeedParser implementation is based on JDOM and Jaxen and is based around
23 * XPath and JDOM iteration. While the implementation is straight forward it
24 * has not been optimized for performance. A SAX based parser would certainly
25 * be less memory intensive but with the downside of being harder to develop.
26 *
27 * @author <a href="mailto:burton@apache.org">Kevin A. Burton (burtonator)</a>
28 * @version $Id: FeedParser.java 155416 2005-02-26 13:00:10Z dirkv $
29 */
30 public interface FeedParser {
31
32 /***
33 * Parse this feed.
34 *
35 * @param resource The URL of the feed being parsed. This is optional and
36 * may be null but is used when an exception is thrown to aid debugging.
37 *
38 */
39 public void parse( FeedParserListener listener,
40 InputStream is ,
41 String resource ) throws FeedParserException;
42
43 /***
44 * @deprecated Use #parse( FeedParserException, InputStream, String )
45 */
46 public void parse( FeedParserListener listener,
47 InputStream is ) throws FeedParserException;
48
49 /***
50 * Parse this feed.
51 *
52 */
53 public void parse( FeedParserListener listener,
54 org.jdom.Document doc ) throws FeedParserException;
55
56 }
57