How to work with simple xml infrastructure for maps

I need to put some data in xml from editText. Let's say this:

<properties> <property key="one">first value</property> <property key="two">second value</property> </properties> 

So, every time I give a new entry, it will add another element inside the root property to my XML file. Let's say I took the key = x and the text against x = "Something"

therefore xml will become:

 <properties> <property key="one">first value</property> <property key="two">second value</property> <property key="x">Something</property> </properties> 

In addition, I want to find a specific value. Suppose I use editText and typed the key x, and pressing the button I can get the value against the key = x; that "Something."

How to do this using a simple xml infrastructure?

0
source share
1 answer

You will need to implement an XML parser as well. There are many tutorials on how to do this. Search for a Sax-Parser tutorial on Google and look at them. I would knit one, but SO actually doesn't look like links that might later be dead

0
source

All Articles