首先:本主题不重复。我无法理解这个主题: Java: How to read and write xml files?
我想通过Android Studio在Android中读取Java的读/写功能。
<name1>
<firstname>Mustafa</firstname>
<secondname>Kemal</secondname>
<surname>Atatürk</surname>
</name1>
Read("name1", "firstname", "")
Read("name1", "secondname", "")
Read("name1", "surname", "")
用于编写的<name1>
</name1>
Write("name1", "firstname", "Mustafa")
Write("name1", "secondname", "Kemal")
Write("name1", "surname", "Atatürk")
<name1>
<firstname>Mustafa</firstname>
<secondname>Kemal</secondname>
<surname>Atatürk</surname>
</name1>
答案 0 :(得分:-2)
我认为XMLStreamReader和XMLStreamWriter类可能正是您所寻找的。但是没有更多的信息,很难说。