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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T02:20:56+00:00 2026-05-21T02:20:56+00:00

in my app i am parsing an xml file. In the xml file i

  • 0

in my app i am parsing an xml file. In the xml file i am having 50 tags of the same name question , now i want to store all the tag named as question as an array….

Among those tags saved i want only one question tag to be placed in a text view….

how to perform this….pls help me…..

  • 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-21T02:20:57+00:00Added an answer on May 21, 2026 at 2:20 am
    public class CustomHandler extends DefaultHandler {
    
        private ArrayList<String> questionList;
        private boolean questionBuffering;
        private StringBuilder sb;
    
    
    
        @Override
        public void startDocument() throws SAXException {
        questionList = new ArrayList<String>();
        } 
    
        @Override
        public void endDocument() throws SAXException {
        } 
    
        @Override
        public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException {
            if (localName.equals("question")) {
                questionBuffering = true;
            }
    
        }
    
    
        @Override
        public void characters(char ch[], int start, int length) {
            if(questionBuffering) {
                sb.append(ch, start, length);
            }
    
        } 
    
        @Override
        public void endElement(String namespaceURI, String localName, String qName) throws SAXException {
            if (localName.equals("question")) {
                questionBuffering = false;
            questionList.add(sb.toString());
            }
        }
    
        public ArrayList<String> getResult() {
            return questionList;
            };
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having a problem while parsing XML file,i used newsRSS parser as a
I'm getting EXC_BAD_ACCESS while parsing XML file in my Xcode4 iPhone app Although I
I am parsing an XML file for an Android app I am writing and
i am parsing a big xml file (1 MB) in my WP7 App. The
I'm using Amazon's simpledb in my app. When parsing xml it gives an error
I am developing a WP7 app. The app has a pretty large XML Parsing
I'm working in a little app that needs to parse an XML file. The
I'm parsing an xml file and I can NSLog the parsing, but my problem
I have this NSXMLParser that parsing an XML file from a webserver parser =
I am working on an app which reads an xml file generated on server

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.