You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2004/06/28 21:59:47 UTC

cvs commit: jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser MetaFeedParser.java OPMLFeedParser.java

burton      2004/06/28 12:59:47

  Modified:    feedparser/src/java/org/apache/commons/feedparser
                        MetaFeedParser.java OPMLFeedParser.java
  Log:
  Better OPML support.  Title and text attributes now supported
  
  Revision  Changes    Path
  1.2       +3 -1      jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser/MetaFeedParser.java
  
  Index: MetaFeedParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser/MetaFeedParser.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MetaFeedParser.java	28 Jun 2004 01:17:37 -0000	1.1
  +++ MetaFeedParser.java	28 Jun 2004 19:59:47 -0000	1.2
  @@ -77,7 +77,9 @@
                   return;
   
               //FIXME: make sure RSS .9 is working and 0.91.  I just need to
  -            //confirm but I think they are working.
  +            //confirm but I think they are working correctly
  +
  +            
               
           }
   
  
  
  
  1.3       +10 -3     jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser/OPMLFeedParser.java
  
  Index: OPMLFeedParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser/OPMLFeedParser.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- OPMLFeedParser.java	28 Feb 2004 03:35:22 -0000	1.2
  +++ OPMLFeedParser.java	28 Jun 2004 19:59:47 -0000	1.3
  @@ -97,15 +97,22 @@
                                      Element current ) throws Exception {
   
           String title = current.getAttributeValue( "title" );
  +
  +        if ( title == null )
  +            title = current.getAttributeValue( "text" );
  +
           String weblog = current.getAttributeValue( "htmlUrl" );
           String description = current.getAttributeValue( "description" );
           String feed = current.getAttributeValue( "xmlUrl" );
   
  -        if ( weblog != null && feed != null ) {
  +        if ( weblog == null )
  +            weblog = feed;
  +        
  +        if ( feed != null ) {
               listener.onItem( state, title, weblog, description, feed );
           } else if ( title != null ) {
               //this is almost certainly a folder
  -
  +            
               listener.onFolder( state, title );
               onOutlineFolder( listener, state, current );
               listener.onFolderEnd();
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org