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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T10:31:45+00:00 2026-06-04T10:31:45+00:00

I am parsing XML with DOM i have some data tags like: <data> <option>abc</option>

  • 0

I am parsing XML with DOM i have some data tags like:

<data>
    <option>abc</option>
    <option>ijk</option>
    <option>fgh</option>
    <option>njk</option>
    <option>klj</option>
    <option>opi</option>
</data>
<data>
    <option>abc</option>
    <option>ijk</option>
    <option>fgh</option>
    <option>njk</option>
    <option>klj</option>
    <option>opi</option>
</data>

I want to insert the options in the list in my layout how can I do the same pls tell. I want that it just parse data of first block and for the next it asks for the trigger event like by clickin on a button.

Thanx 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-04T10:31:47+00:00Added an answer on June 4, 2026 at 10:31 am

    Since you want to parse partial XML data, it would be better to use the XmlPullParser.

    You would need to have a method that reads one block at a time keeping a reference to the parser as a member variable.

    public class PartialXmlParser{
        private XmlPullParser xpp;
    
        public PartialXmlParser(String xml){
             XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
             factory.setNamespaceAware(true);
             xpp = factory.newPullParser();
    
             xpp.setInput( new StringReader (xml ) );
        }
    
        public List<String> getData(){
            List<String> retValue = new List<String>();
            //Logic to read one block of data and add to retValue
            //
            return retValue;
    
        }
    }
    

    and call the getData method in the callback event (like OnClick of the button). Remember to use the same instance of the object for getting the data.

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

Sidebar

Related Questions

Hi BB developers I have a issue while parsing the xml data using DOM.
I am working on a javascript project which involves parsing xml data. I have
I have xml file in server. I am parsing this xml using DOM(xml is
I'm relatively new to Perl, writing some XML parsing scripts. I have done two
I have been using DOM for parsing my small xml docs for sometime.Afer reading
I have a question in parsing XML. How can I parse out the value
i'm still transitioning from as2 to as3, i'm having trouble with parsing XML data
Can anyone tell me which one better to use for xml parsing - DOM
I have been using DOM for a long time and as such DOM parsing
Having a bit of trouble parsing xml with dom and DocumentBuilder. I'm able to

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.