burton      2004/08/16 16:17:45

  Modified:    feedparser/src/java/org/apache/commons/feedparser
                        AtomFeedParser.java
               feedparser/src/java/org/apache/commons/feedparser/locate
                        FeedLocator.java
               feedparser/src/java/org/apache/commons/feedparser/test
                        TestFeedLocator.java
  Log:
  Fixed bug with CDATA encode on Atom feeds
  
  Revision  Changes    Path
  1.10      +2 -2      
jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser/AtomFeedParser.java
  
  Index: AtomFeedParser.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser/AtomFeedParser.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- AtomFeedParser.java       30 Jul 2004 06:22:08 -0000      1.9
  +++ AtomFeedParser.java       16 Aug 2004 23:17:44 -0000      1.10
  @@ -242,7 +242,7 @@
               } else if ( next instanceof Element ) {
                   buff.append( outputter.outputString( (Element)next ) );
               } else if ( next instanceof CDATA ) {
  -                buff.append( outputter.outputString( (CDATA)next ) );
  +                buff.append( ((CDATA)next).getText() );
               } else if ( next instanceof Comment ) {
                   buff.append( outputter.outputString( (Comment)next ) );
               } else if ( next instanceof Text ) {
  
  
  
  1.15      +3 -1      
jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser/locate/FeedLocator.java
  
  Index: FeedLocator.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser/locate/FeedLocator.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- FeedLocator.java  13 Aug 2004 21:51:32 -0000      1.14
  +++ FeedLocator.java  16 Aug 2004 23:17:44 -0000      1.15
  @@ -91,7 +91,9 @@
   
           //String resource = "http://codinginparadise.org/";;
   
  -        String resource = "http://georgewbush.com/blog";;
  +        String resource = "http://guinness.joeuser.com";;
  +        
  +        //String resource = "http://georgewbush.com/blog";;
   
           //String resource = "http://carolinascl.blogspot.com/";;
           
  
  
  
  1.3       +11 -8     
jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser/test/TestFeedLocator.java
  
  Index: TestFeedLocator.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/feedparser/src/java/org/apache/commons/feedparser/test/TestFeedLocator.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestFeedLocator.java      13 Aug 2004 23:17:19 -0000      1.2
  +++ TestFeedLocator.java      16 Aug 2004 23:17:44 -0000      1.3
  @@ -52,6 +52,8 @@
   
       private void doTest( String resource ) throws Exception {
   
  +        System.out.println( "resource: " + resource );
  +        
           FeedList l = FeedLocator.locate( resource );
   
           Iterator it = l.iterator();
  @@ -66,13 +68,14 @@
       }
       
       public void test1() throws Exception {
  -        doTest( "file:///projects/feedparser/tests/locate1.html" );
  -        doTest( "file:///projects/feedparser/tests/locate2.html" );
  -        doTest( "file:///projects/feedparser/tests/locate3.html" );
  -        doTest( "file:///projects/feedparser/tests/locate4.html" );
  -        doTest( "file:///projects/feedparser/tests/locate5.html" );
  -        doTest( "file:///projects/feedparser/tests/locate6.html" );
  -        doTest( "file:///projects/feedparser/tests/locate7.html" );
  +
  +        doTest( "file:tests/locate1.html" );
  +        doTest( "file:tests/locate2.html" );
  +        doTest( "file:tests/locate3.html" );
  +        doTest( "file:tests/locate4.html" );
  +        doTest( "file:tests/locate5.html" );
  +        doTest( "file:tests/locate6.html" );
  +        doTest( "file:tests/locate7.html" );
           
       }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to