tags:

views:

26

answers:

1

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>

findProducts() should give me all the subelements with all the attributes

How do i do this ..

Thanks

A: 

I am assuming Java... try this:

 digester.addObjectCreate("productlist", ArrayList.class);
 digester.addCallMethod("productlist/products", "add", 1);
 digester.addCallParam("productlist/products", 0);
Nix
thnks for the answer i m using java itself ,i got wat u said ,but plz can u elaborate it ,wat do i do in add() to get all the subelements content
jyo
I don't understand your question.
Nix