| Author |
inserting queries
|
duhit Choudhary
Ranch Hand
Joined: Apr 01, 2012
Posts: 64
|
|
when i tried to execute this code, it is giving me only one value throughout. but i want all the values given in the xml file... please tell me where am i wrong in this code and how to get different desired values.
thanks a lot...
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16487
|
|
|
You only have one object, and you keep adding it to the List. Create a new object each time when you get data from the XML instead of reusing the single object.
|
 |
duhit Choudhary
Ranch Hand
Joined: Apr 01, 2012
Posts: 64
|
|
|
thank you so much but can you tell me in which line?
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16487
|
|
|
You don't have an extremely large number of lines where you add an object to a list...
|
 |
duhit Choudhary
Ranch Hand
Joined: Apr 01, 2012
Posts: 64
|
|
|
i got that line by the way.... but thanks for your help. it was really very helpfull
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16487
|
|
|
That's a very common "gotcha", by the way, a lot of beginners get caught doing that.
|
 |
duhit Choudhary
Ranch Hand
Joined: Apr 01, 2012
Posts: 64
|
|
i'll try not to repeat these type of silly mistakes again...
|
 |
 |
|
|
subject: inserting queries
|
|
|