简体   繁体   English

使用Apache摘要器解析XML

[英]using apache digester to parse xml

have an xml of the form 具有以下形式的xml

<Node name="1">
   <Node name="2">
       <Node name="4"></Node>
   </Node>
   <Node name = "3">
       <Node name="5"></Node>
    </Node>
</Node>

i want to parse the xml using digester and obtain the following datastructure 我想使用摘要器解析xml并获取以下数据结构

Node{
 String name;
 List<Node> nodeList
}

Is this possible using digester? 使用消化器可以吗?

Yes, it is possible. 对的,这是可能的。 I suggest you read Digester documentation and post concrete question if something doesn't work as you expect it to. 我建议您阅读Digester文档,并发表一些具体的问题,以解决某些无法正常工作的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM