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

  • Home
  • SEARCH
  • 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 7639665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T08:28:35+00:00 2026-05-31T08:28:35+00:00

I want to parse XML in java. It will be DOM or SAX. Read

  • 0
  1. I want to parse XML in java. It will be DOM or SAX. Read in a book JAXP is good one. Also when i google out found XERCES/XALAN. Which parser is commonly used?

  2. In SAX Parser if i register for a single element event will the SAX parse stops processing the XML message after encountering the element. Read in a book DOM reads the entire XML and loads into memory even if i want to know single element value.

  • 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-31T08:28:37+00:00Added an answer on May 31, 2026 at 8:28 am
    1. All of the above parsers you mention are excellent. My personal preference would be XERCES if the application did a lot of XML processing, otherwise, the “built in” parsers are more than good enough.

    2. You will need to process every event from the SAX parser and ignore the ones you are not interested in. You can stop parsing at any point by “destroying” the parser object. If you are only interested in one or two elements of a large message then SAX is the way to go. If you are interested in all or most of the elements then use the DOM parser, you take a slight performance hit, but, the “give me what I want” API makes for much clearer code than the “take what I give you” SAX API.

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

Sidebar

Related Questions

I want to sax-parse in nokogiri, but when it comes to parse xml element
I parse a big xml document with Sax, I want to stop parsing the
I want to parse an XML file with Java and validate it in the
I want to use XPath (in Java) to parse XML files. However these XML
I want to read XML data using XPath in Java, so for the information
i have some xml code, and i want to parse this to java object
I want to parse an xml log file, using Java. The weird thing though
I want to parse xml files that have elements like these: <element>&amp</element> <element>&amp;</element> But
I want to parse XML in bash and xpath could do it. (To get
I want to parse a XML document once - at Rails application startup. It

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.