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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:19:53+00:00 2026-06-13T07:19:53+00:00

How to properly write android xml resource where object has a main ID and

  • 0

How to properly write android xml resource where object has a main ID and sub-objects has subID’s

I have very good example to explain my problem. Example is written in Plist(modified xml version for iOS):

<plist version="1.0">
<dict>
<key>223</key>----main key/ID
<dict>
<key>name</key>----sub-key/ID
  <string>Bill</string>
<key>uzvards</key>
  <string>Gates</string>
<key>adress</key>
  <string>Broadway</string>

So i need this type of data structure written in android XML. I guess xml file should be created in Values folder and use Resource type !? Thank you.

  • 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-13T07:19:54+00:00Added an answer on June 13, 2026 at 7:19 am

    After looking into Plist, I think my comment was a suitable answer. In your actual code, you will want to use something like a hashmap, for your data. Depending on what you want, there are numerous ways to set this up but you can create a new hashmap

    HashMap<String, String> myMap = new Hash<String, String>(); 
    

    then use put(key, value) to add things to the map which you may get from a TextView and could display in an EditText. You can also use ArrayList and many others depending on what you want to accomplish. Or HashMaps inside of HashMaps.
    Note: if you want to keep the order of your map you will want to use a linked hashmap
    The res directory is where you store your XML for layouts(UI). My comment link should explain that very well. Hope this helps.

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

Sidebar

Related Questions

I have a problem to write and read properly a CSV file composed of
Typically I have to write layout code like this: <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent android:layout_height=fill_parent android:orientation=vertical
I have a simple android app that has quite a number of buttons, all
I have an android app that has has this css for the body background:
In my application i have an activity which has the following layout <?xml version=1.0
I write an app and it works properly on android 2.3.3 , but it
I have an Android Library Project that contains several styles/themes defined in its styles.xml
I have the following layout file: <?xml version=1.0 encoding=utf-8?> <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent android:layout_height=wrap_content android:background=#FF0000
Can someone help me understand how to write this case statement properly its not
I am developing an android app. I have parsed text and image both in

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.