[英]using SAX parser, how do you parse an xml file with out some foreknowledge of the structure of the xml?
有没有一种方法可以实现sax解析器,而无需像在getChild方法或equalsIgnoreCase(tagname)中那样在xml中传递元素的名称? 或者有没有一种方法可以找出xml中的标记名称,然后将其传递给Sax方法。
看这个链接
https://stackoverflow.com/a/4828765/1631457
1)是android sax解析器示例(不要激怒我)
向下滚动一点,您会看到
2)org.xml解析器示例(我认为您想要这种用法)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.