如何与地图简单的XML框架而努力 [英] How to work with simple xml framework for maps

查看:161
本文介绍了如何与地图简单的XML框架而努力的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要把一些数据以XML从EDITTEXT。比方说,象下面这样:

I need to put some data in xml from editText. Lets say like below:

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

所以,每次我会给一个新的条目中的属性在我的XML文件中根将追加另一个元素。可以说我拿了钥匙= X&放大器;针对点¯x文本=东西

So, each time i will give a new entry it will append another element inside properties root in my xml file. Lets say i took key= x & text against x = "Something"

因此​​,XML将成为:

so, the xml will become:

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

此外,我要搜索一个特定的值。比方说,我使用的是EDITTEXT&安培;输入一个密钥x和点击链接,我可以取回对键= X的值;这是东西。

moreover, i want to search for a specific value. Lets say i am using a editText & typed a key x and in button click i can retrieve the value against the key=x; which is "Something".

如何做到这一点用简单的XML框架?

How to do this using simple xml framework?

推荐答案

您需要实现和XML解析器。有很多教程在那里就如何做到这一点。搜索在谷歌SAX解析器教程,看看他们。我会联系的,但这样做真的很喜欢,可能在以后死链接

You'll need to implement and XML parser. There are many tutorials out there on how to do this. Search on Google for "sax parser tutorial" and look at them. I'd link one, but SO doesn't really like links that might be dead later

这篇关于如何与地图简单的XML框架而努力的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆