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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:55:11+00:00 2026-05-23T12:55:11+00:00

I am having one XML file and I want to parse only useful data

  • 0

I am having one XML file and I want to parse only useful data from it..

My XML is like this:

<seller>
    <id type="integer">101</id>
    <name>James</name>

       <bidder>
            <id type="integer">1978271</id>
            <name>SCJP</name>
       </bidder>
</seller>

<seller>
    <id type="integer">102</id>
    <name>Joseph</name>

       <bidder>
            <id type="integer">1978272</id>
            <name>MCST</name>
       </bidder>
</seller>

MY Problem:
I have a code for that but it returns both the id of seller and bidder..i want only seller id and most important without use of flag set..

please.Is anyone know that things help me as early as possible..

  • 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-23T12:55:11+00:00Added an answer on May 23, 2026 at 12:55 pm

    http://www.ibm.com/developerworks/opensource/library/x-android/

    Scroll down to the SAX Parser.
    What you should know is that you need to put the characters in a buffer like they do in the example:

     @Override
        public void characters(char[] ch, int start, int length)
                throws SAXException {
            super.characters(ch, start, length);
            builder.append(ch, start, length);
        }
    

    And at the closing tag take care of the builder to be able to fetch the id. Since they have the same name tag you need to have some booleans which tells you were in the parsing you are.

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

Sidebar

Related Questions

I am having one xml file and I want to parse it to get
I am having on xml from which i have to remove the one book
I am using Linq To Xml to create an Xml file from DataSet. This
Hi i am having a one xml file and some image files, i am
I am having one heck of a hard time trying to figure this out.
I am having one Gtk+ and C application in which i want to set
I've loaded an XML file as NSData into memory and parse over the elements
I am having issues integrating junit with a working ant build.xml file. My test
I am having a java project with a ant build file, using this ant
I have an existing XML schema that contains a type that I would like

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.