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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:51:20+00:00 2026-05-13T06:51:20+00:00

Can anyone point me to a explanation for or explain to me how I

  • 0

Can anyone point me to a explanation for or explain to me how I can easily parse the XML and get values of a w3c.Document on Android using only Android OS Libs?

I tried to use a implementation of dom4j, but it is very slow 🙁

  • 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-13T06:51:20+00:00Added an answer on May 13, 2026 at 6:51 am

    You should definitively use the SAX APIs provided. Android XML parse API stacks on top of the normal java SAX one so in my opinion I would just use the normal Java SAX API and this way you get the ability to test your code as normal java desktop project.

    XML parsing is always slow and using these SAX parsers is as good as it gets (unless you write a custom parser from the scratch).
    Word of advice: Try to minimize string comparison and try to use hashmaps instead of long chains of if (token.isEqual(CONSTANT_TOKEN));.

    Here are a few examples of Java XML parsing: http://java.sun.com/developer/codesamples/xml.html#sax

    Android XML API is declarative, the paradigm is a bit different so in case you decide going with that, be prepared to read a few examples to learn its ways.

    Finally, maybe 2 months ago I saw a chart benchmarking DOM vs SAX vs Android XML API (I can’t quite find the link now). The conclusion was that DOM was by far the slowest and SAX was top but not by a huge margin over Android’s XML implementation.

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

Sidebar

Related Questions

Can Anyone point Me in the direction of how to tell when, for example,
Can anyone point me at an example of a customized Google Chrome Frame install
Can anyone point me toward a Go library that will give me the ability
Can anyone point me to some documentation about how I can use an Iso
can anyone point to a site or describe how I can go about designing
Can anyone point me at a decent repository or dependency injection library for any
Can anyone point me to an example on how to use CURRENT_DATE in a
can anyone point me in the direction of a good tutorial on how makefiles
Can anyone point me towards a ready made RSS screen scraper, preferably in Python
Can anyone point me in the right direction on how I would minimize ambient

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.