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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:22:17+00:00 2026-05-27T16:22:17+00:00

I have a situation to parse an XML which is having much data in

  • 0

I have a situation to parse an XML which is having much data in attributes and levels to access the data inside the XML hierarchy.

Confused about which parser to be used for this to be a effective approach for parsing. Parsing the XML and how to access the attributes & its value.

I was preferring DOM parser and trying to parse it but it was a little complex as i needed to get a tag -> then an attribute -> then attr value and on that condition need to get another tag access.

 <testCodeIdentifier classCode="ROL" >
                <realmCode code="QD" />
                <id assigningAuthorityName="PRMKEY" extension="SJC16494"  />
                <statusCode code="active" /> 
                <playingTestCodeDetails classCode="ENT" determinerCode="INSTANCE" >
                  <realmCode code="QD" />
                  <id assigningAuthorityName="PRMORDCODE" extension="16494"  />
                  <id assigningAuthorityName="TESTNUMINBOOK" extension="16494"  />
                  <code code="16494" codeSystemName="QTIM" displayName="SureSwab Candidiasis" /> 
              <name  use=""></name>
                  <asSeeAlsoCode classCode="ROL" > 
                    <realmCode code="QD" />
                    <code code="7600" displayName="Sample See Also Name" ></code>
                  </asSeeAlsoCode>    
                  <asSeeAlsoCode classCode="ROL" >
                <realmCode code="QD" />
                <code code="6496" displayName="Sample See Also Name" ></code>
                  </asSeeAlsoCode>
                </playingTestCodeDetails>
    </testCodeIdentifier>

Above is the sample XML in which all attributes are present as data i need to traverse them… JAXB..how can we use it????

  • 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-27T16:22:17+00:00Added an answer on May 27, 2026 at 4:22 pm

    IF the size of the XML file isn’t going to be huge, you can look at following options:

    1. JAXB (If you have a schema definition, it will generate the objects and auto populate for you).

    2. JiBX (Another good alternative. You can define custom mapping of XML attributes to Java Objects)

    3. XStream (Also allows you to map XML attributes to Java Objects).

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

Sidebar

Related Questions

I have written an application which outputs data as XML. However, it would be
I have situation in which I read a record from a database. And if
I have situation where a user can manipulate a large set of data (presented
We have a situation in our product where for a long time some data
I need to parse XML string into an array. I have XML <group xmlns=123
I have an awkward situation in which I have a 32-bit lib that must
i have the following situation : with my function i get an XML file
In this situation I am trying to perform a data import from an XML
Need help with following situation: Users can generate their own data structures which are
Im using XMLReader to parse XML but i've come across a situation where two

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.