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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T13:28:33+00:00 2026-05-29T13:28:33+00:00

I´m trying to use spring android to parse an xml that looks like that

  • 0

I´m trying to use spring android to parse an xml that looks like that on my android code (to serialize/deserialize objects streaming from server and/or send them in post to the REST service):

<ROOT>
<USERNAME>user</USERNAME>
<INFOTYPE></INFOTYPE>
<DATA format='xml_field'>
<field name='field_id1'>1000</field>
<field name='field_id2'>xxx</field>
</DATA>
</ROOT>

I don´t know if it would be possible, but I really like this tool (spring android).

However, I would accept any easy solution that addresses my issue.

ps: I’ve already read other threads like this:
Unmarshalling XML files into Java objects in Android?
and at the moment this looks like the best solution for my case: http://simple.sourceforge.net.

  • 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-29T13:28:33+00:00Added an answer on May 29, 2026 at 1:28 pm

    The Spring reference basically answers your question:

    2.2.4 Object to XML Marshaling

    Object to XML marshaling in Spring Android RestTemplate requires the use of a third party XML mapping
    library. The Simple XML serializer is used to provide this marshaling
    functionality.

    The easy way is to just pick up this suggestion and go with Simple. I’ve used it a couple of times myself and it’s very easy to set up and has a fairly straightforward way of declaring the hierarchy using Java POJOs. (On a side note: I still prefer JSON though. :))

    Alternatively it wouldn’t require a lot of effort to implement (de)serializing using SAX, provided your xml structures are as simple as your example. This option will probably keep your code more compact.

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

Sidebar

Related Questions

I'm trying to use Spring IoC with an interface like this: public interface ISimpleService<T>
I'm trying to use the Android tutorial to build an app that loads a
I'm trying to parse the XML HttpResponse i get from a HttpPost to a
I am facing an issue while trying to use the spring android framework. I
I'm trying to use SimpleXML to parse an XML document (an ItemLookupResponse for a
I am trying to writing code so that my android application can query a
I am trying to use the Android SimpleDateFormat like this: String _Date = 2010-09-29
I am trying to use Spring.NET with a C# application to populate a parameter
I have a Spring MVC application trying to use a rich domain model, with
I'm trying to use UTF-8 encoding for the Spring application I'm developing but I

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.