Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7651619
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T11:33:10+00:00 2026-05-31T11:33:10+00:00

I want to read an RSS feed on my app, i have been based

  • 0

I want to read an RSS feed on my app, i have been based on some guides, and i succeed to implement the basics. However, when i open an RSS item, the title is showen, but the description(that have more caracters) ends with some 13 lines and three points(…). I’ve read in JAVA doc that StringBuffer has a limited capacity, and when it arrives on its full capacity it sets a points. That why i think that the problem comes from StringBuffer:

    public void startElement(String uri, String localName, String name, Attributes attributes) throws SAXException {
            // Nous réinitialisons le buffer a chaque fois qu'il rencontre un item
            buffer = new StringBuffer();        

            // Ci dessous, localName contient le nom du tag rencontré

            // Nous avons rencontré un tag ITEM, il faut donc instancier un nouveau feed
            if (localName.equalsIgnoreCase(ITEM)){          
                this.currentFeed = new Feed();
                inItem = true;
            }

            // Vous pouvez définir des actions à effectuer pour chaque item rencontré
            if (localName.equalsIgnoreCase(TITLE)){
                // Nothing to do    
            }
            if (localName.equalsIgnoreCase(LINK)){
                // Nothing to do    
            }
            if (localName.equalsIgnoreCase(PUBDATE)){   
                // Nothing to do    
            }
            if (localName.equalsIgnoreCase(CREATOR)){
                // Nothing to do
            }
            if(localName.equalsIgnoreCase(DESCRIPTION)){

            }
        }

@Override
    public void endElement(String uri, String localName, String name) throws SAXException {     

        if (localName.equalsIgnoreCase(TITLE)){
            if(inItem){             
                // Les caractères sont dans l'objet buffer
                this.currentFeed.setTitle(buffer.toString());               
                buffer = null;
            }
        }
        if (localName.equalsIgnoreCase(LINK)){
            if(inItem){             
                this.currentFeed.setLink(buffer.toString());                
                buffer = null;
            }
        }
        if (localName.equalsIgnoreCase(PUBDATE)){   
            if(inItem){             
                this.currentFeed.setPubDate(buffer.toString());             
                buffer = null;
            }
        }
        if (localName.equalsIgnoreCase(CREATOR)){
            if(inItem){             
                this.currentFeed.setCreator(buffer.toString());             
                buffer = null;  
            }
        }
        if(localName.equalsIgnoreCase(DESCRIPTION)){
            if(inItem){             
                this.currentFeed.setDescription(buffer.toString());             
                buffer = null;
            }
        }
        if (localName.equalsIgnoreCase(ITEM)){      
            feeds.add(currentFeed);
            inItem = false;
        }
    }

    // * Tout ce qui est dans l'arborescence mais n'est pas partie  
    // * intégrante d'un tag, déclenche la levée de cet événement.  
    // * En général, cet événement est donc levé tout simplement 
    // * par la présence de texte entre la balise d'ouverture et 
    // * la balise de fermeture

    public void characters(char[] ch,int start, int length) throws SAXException{        
        String lecture = new String(ch,start,length);
        if(buffer != null) buffer.append(lecture);              
    }


    // cette méthode nous permettra de récupérer les données
    public ArrayList<Feed> getData(){
        return feeds;
    }
}

Any help please? Thank you very much.

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:orientation="vertical"
  >
    <TextView android:text="" android:id="@+id/tv_title" android:layout_gravity="center_horizontal" android:layout_height="50dp" android:layout_width="fill_parent"/>
    <TextView android:text="" android:id="@+id/tv_content" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="20dp"/>
    <TextView android:text="" android:id="@+id/tv_date" android:layout_marginTop="30dp" android:layout_height="fill_parent" android:layout_width="fill_parent"/>
</LinearLayout>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T11:33:13+00:00Added an answer on May 31, 2026 at 11:33 am

    No, StringBuffer has no such behavior. You’re probably using a TextView and have the ellipsize attribute set or your feed data actually is truncated and ellipsized itself. Take a look at the RSS feed directly in a browser to see if it is.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to read and save some data from this rss feed to in
I'm trying to read an RSS feed from Flickr but it has some nodes
I Have been developing an Android RSS reader.I want to fetch the images from
I have some html content in a SQL Server column, I want to read
I want to read multiple RSS feeds using jQuery. I'm trying to write a
I want to be able to read any well-formed RSS/ATOM file. That would mean
I have a text file. I want read that file. But In that if
I have a specific object with image data. And I want read/write images (in
I want to read the registry to find the current PowerPoint version. However this
I want to read UTF-8 strings from a server that I have control of,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.