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

  • SEARCH
  • Home
  • 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 9136861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:00:38+00:00 2026-06-17T09:00:38+00:00

android version:4.2 my sample code is: try { //HttpResponse response = httpClient.execute(httpGet, localContext); HttpResponse

  • 0

android version:4.2
my sample code is:

   try {
   //HttpResponse response = httpClient.execute(httpGet, localContext);
   HttpResponse response = httpClient.execute(httpGet, localContext);
   HttpEntity entity = response.getEntity();
   text = getASCIIContentFromEntity(entity);

   text=text.replaceAll("&lt;", "<").replace("&gt;", ">").replace("&nbsp;", " ");

   int start=text.indexOf("<message>");
   start=start+9;
   int end=text.indexOf("</message>");
   text=text.substring(start, end);



   JSONArray ja = new JSONArray(text) ;
       // ITERATE THROUGH AND RETRIEVE CLUB FIELDS
    int n = ja.length();
    for (int i = 0; i < 1; i++) {
        // GET INDIVIDUAL JSON OBJECT FROM JSON ARRAY
     JSONObject jo = ja.getJSONObject(i);

     title+= jo.getString("Title")+",";
     url= jo.getString("URL");
     desc= jo.getString("Description");                             
    }
 } catch (Exception e) {
         return e.getLocalizedMessage();
}

issue: Varible desc(i.e., description in my json)contains **&nbsp;** in its contents.I have converted HTML into string in android using following code:

Spanned marked_up = Html.fromHtml(results);
tv2.setText(marked_up.toString(),BufferType.SPANNABLE);

Still it is not replacing **&nbsp;**.
Help me anyone plz.
ThankYou in advance.

  • 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-06-17T09:00:38+00:00Added an answer on June 17, 2026 at 9:00 am
    marked_up.toString().replaceAll("&nbsp","");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am testing this sample on version 13 of android (3.2) and I have
I try to build a sample Sencha app for Android platform with this tutorial:
I get the following errors when I try to compile any Android RenderScript sample
When I go to the directory C:/programfiles/android/android-sdk/platform/<version>/ I couldn't find the samples directory. I
I want install Android version 1.6 SDK. I already have Android development setup with
I am working on project of android in eclipse.Android version is 2.3.3. I had
We have a usb port in our android tablet(version 4.0.3). How do we find
I downloaded the most recent version of Android for Linux (android-sdk_r05-linux_86.tgz). I was trying
I have an Android application with version 1.6 I take the wallpaper and show
We developed an android app for version 2.1 but the customers requires it should

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.