Traversing complex xml File in android(在android中遍历复杂的xml文件)
问题描述
我在这个链接上有一个 xml 文件
I have a xml file that is on this link
http://nchc.dl.sourceforge.net/project/trialxml/options.xml
我已经成功下载并解析了它,还做了一个动态 UI,但我没有使用任何预定义的函数,如 getFirstChild()、getNextSibling()使我的解析器无法解析具有大约 6-7 级菜单的复杂 XML 文件.
I have downloaded and parsed it successfully and also made a dynamic UI, but I have not used any of the predefined functions like getFirstChild(), getNextSibling() which makes my parser incompatible of parsing complex XML files having around 6-7 levels of menus.
请帮助如何遍历XML文件,并动态创建UI.
Please help how to traverse a XML file,and dynamically create a UI.
推荐答案
尝试使用 DOM parser,解析你的 xml 文档
Try using DOM parser, to parse your xml document
查看此链接了解更多详情:
http://tutorials.jenkov.com/java-xml/dom.html
这篇关于在android中遍历复杂的xml文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在android中遍历复杂的xml文件
基础教程推荐
- Spring AOP错误无法懒惰地为此建议构建thisJoinPoin 2022-09-13
- 问题http://apache.org/xml/features/xinclude测试日志4j 2 2022-01-01
- 存储 20 位数字的数据类型 2022-01-01
- RabbitMQ:消息保持“未确认"; 2022-01-01
- 无法复制:“比较方法违反了它的一般约定!" 2022-01-01
- Struts2 URL 无法访问 2022-01-01
- REST Web 服务返回 415 - 不支持的媒体类型 2022-01-01
- 修改 void 函数的输入参数,然后读取 2022-01-01
- 如何对 Java Hashmap 中的值求和 2022-01-01
- 使用堆栈算法进行括号/括号匹配 2022-01-01
