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);
精彩评论