Android and XML Maps

Can you create an XML object resource with key-value pairs (basically a hash file) using an XML file similar to arrays.xml? It would be an analogue of NSDictionary from Obj-C.

i.e.

<key>foo</key>
<value>bar</value>

I would like the value to be an array of strings, and I would like to be able to copy and paste the XML files into my Obj-C projects.

Thank.

+3
source share
1 answer

A good alternative is to create JSON objects and access them using GSON . If you already have a PList resource from an iPhone project, one way to convert to JSON is to create an object from PList and write it to a JSON string file.

+1
source

Source: https://habr.com/ru/post/1788928/


All Articles