![](/img/trans.png)
[英]How do i retrieve the data using JSON from the Remote Database and display in my android app xml file?
[英]How can i use data from .XML file for android App?
我正在開發小說的android應用程序。 我擁有的所有數據都是.xml格式,就像章節ID,然后是行ID。 我想在應用程序中添加一項功能,以准確搜索任何章節的任何行。 該XML文件會有所幫助嗎? 此外,我可以使用XML作為應用程序的后端數據保持器,但是分別使用什么腳本導入數據?
<chapter index="1" name="intro">
<line index="1" text="lorus depegumasd" />
<line index="2" text="as ilatuyn masdu" />
<line index="3" text="its aduw adeioyan" />
</chapter>
<chapter index="2" name="preface">
<line index="1" text="lorus depegumasd" />
<line index="2" text="as ilatuyn masdu" />
<line index="3" text="its aduw adeioyan" />
</chapter>
就像我上面提到的那樣。 請幫助我有關用於添加功能的腳本,以便在android app中用戶可以加載任何章節的任何行或給定范圍的內容,例如第7章的第3至6行
問候--shumail
IBM擁有關於在Android中使用XML的出色教程,其中提供了有關如何解析XML源的幾個選項。 它們提供了示例代碼,並說明了哪種方法在哪種情況下最有用。 在這里看看: 在Android上使用XML
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.