开发者

How do i create methods from the parsed values from the xml file

I have parsed an xml file using the digester parser , now i need to create a method like

If I have a

              <productlist>
                  <products> </products>
                  .
                  ..

              </productlist>

findP开发者_运维技巧roducts() should give me all the subelements with all the attributes

How do i do this ..

Thanks


I am assuming Java... try this:

 digester.addObjectCreate("productlist", ArrayList.class);
 digester.addCallMethod("productlist/products", "add", 1);
 digester.addCallParam("productlist/products", 0);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜