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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:45:37+00:00 2026-06-16T02:45:37+00:00

My application receives some data from server in XML form. I parse it using

  • 0

My application receives some data from server in XML form. I parse it using XmlPullParser. Everything works fine. Until server sends large nested object – bitmap or file in BASE64 encoding (up to 10+Mb). On old devices with little VM heap (2.3 for example) application crashes on String text = parser.getText(); (out of memory)

What should I do in this case?

Is there any way to get stream? Or mabey XmlPullParser can split it and give it to me by parts?

  • 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-16T02:45:38+00:00Added an answer on June 16, 2026 at 2:45 am

    One possiblility is to swich to Sax Parsing. The main difference being that it will not need to read the entire xml string into memory at once. Instead it will work its way through it in small chunks.

    It is a bit more complex to set up, but if you search around online for things like “Android Sax Parsers example” there are some good samples to get you started. It is really not any more difficult just takes a moment to get accustomed to doing it that way instead of with a pull parser.

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

Sidebar

Related Questions

I have a server application that receives some special TCP packet from a client
Hi my application requesting some data from server , application shows Dialog to the
I am developing a application which receives 600-700 KB of XML data from the
I am sending and receiving data using fsockopen and fwrite. My application receives the
I`m developing an application which receives data from my GPS device like coordinates, speed
I am currently developing a web application that receives data from an on-site database.
My script receives gzipped data from a desktop application via POST, which it retrieves
Background I have an application that receives periodic data dumps (XML files) and imports
I have a Python application that, to be brief, receives data from a remote
In my application, I defined an XMLDataSource in the ASPX: <asp:XmlDataSource ID=XmlThickness runat=server DataFile=~/XML/Data/products.xml

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.