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 6729975
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:21:12+00:00 2026-05-26T10:21:12+00:00

I have to display cat_name in listview and when i click any name it

  • 0

I have to display cat_name in listview and when i click any name it will display it’s cat_description. my url is http://mobileecommerce.site247365.com/admin/catdata.xml

I can able to display name in listview.My problem is i parse whole cat_desc but i want particular cat_desc according to cat_name.if any one have an idea for this?

I use

if(currenttag.equals("Cat_Desc"))
    sitesList.setCat_Desc(String.valueOf(ch,start,length));

For set cat_desc. but it will set all cat_desc but i want specific cat_desc.
When i fetching cat_desc i use sitelist.getcatdesc().size().It will show me approximately 4500.

If any one having any solution or give me solution for this.

My Handler-

public void startElement(String uri, String localName, String qName,Attributes attributes) throws SAXException 

{     
   currenttag=localName;

if(currenttag.equals("NewDataSet")) {           
    currentElement =true;       
    sitesList = new SitesList();            

   }            
}
public void endElement(String uri, String localName, String qName)throws SAXException

{

    super.endElement(uri, localName, qName);
        if(qName.equals("NewDataSet"))
          {
            currentElement = false;
          }

     }
public void characters(char[] ch, int start, int length)throws SAXException

{


if(currenttag.equals("Cat_Name"))


   sitesList.setCat_Name(String.valueOf(ch,start,length));



else if(currenttag.equals("Cat_Desc"))


   sitesList.setCat_Desc(String.valueOf(ch,start,length));

java class–

 for (int i = 0; i less than sitesList.getCat_Name().size(); i++) 

    catNames[i]=sitesList.getCat_Name().get(i);         



for(int j=0; j less than sitesList.getCat_Desc().size();j++)                

   catdesc[j]=sitesList.getCat_Desc().get(j);

Thanks and Regards

Arpit

  • 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-26T10:21:12+00:00Added an answer on May 26, 2026 at 10:21 am

    If I’m understanding you correctly, you can modify this code:

    else if(currenttag.equals("Cat_Desc"))
    
    
       sitesList.setCat_Desc(String.valueOf(ch,start,length)); 
    

    To this

     else if(currenttag.equals("Cat_Desc")){
       sitesList.setCat_Desc(String.valueOf(ch,start,length));
         if(currentCat.equals("desired_cat"){
           specialDescription = String.valueOf(ch,start,length);
    

    Where specialDescription is a field (instance variable) in your SaxParser class.

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

Sidebar

Related Questions

so let's say I have a registration model and I have: [Display(Name = )]
Howdy. It's me again, and It's jQuery again. I have somthing like that: http://misiur.com/small/
I have use following code to display category and there product on click patent
I have a form which collects user info including name, location, url, email address
I have an image in WPF that I would like to have display different
When you set an html element to have display: none , the content inside
How do I center an element of unknown width containing elements that have display:
I have to display current server host (in PHP, but it is not very
I have to display images from the Photo Library using UIScrollview. Except the first
I have to display the textviews dynamically in android and need to write onclick

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.