Hi Werner,
 Thanks for the reply.
I looked into the Unmarshallistener class. I have one more question. If for
eg., there are a very large number of persons in the xml, the unmarshal
method() in my client code seems to require me to define a container class
like "Persons" which holds a list of Person objects  and returns the
container class, here an instance of Persons.Is it possible to get around
this as I dont want the unmarshaller to store the large number of person
objects in the list(in memory) of my container class. I would rather just
use the listener and decide if i want to store them in mem or not.

Thanks.



Werner Guttmann wrote:
> 
> Hi,
> 
> have a look at the UnmarshalListener as documented here:
> 
> http://castor.org/javadoc/org/exolab/castor/xml/UnmarshalListener.html
> 
> Regards
> Werner
> 
> kirran wrote:
>> Hi All,
>> 
>> Any help is sincerely appreciated. 
>> 
>> sample xml
>> ---
>> <person name="tom"/>
>> <person name="brady"/>
>> 
>> 
>> class Person{
>> private name;
>> public void setName(String name){
>> this.name=name;
>> }
>> }
>> 
>> When i use castor, it gives me a collection of person objects. What i
>> need
>> is a callback in my client code after each person 
>> 
>> element is parsed into an object sequentially so that i can invoke
>> operations on each object. This is also inline with my req. 
>> 
>> of not storing an entire collection of persons in memory at once.
>> 
>> Thanks in advance.
>> 
>> 
>> 
>> 
>> 
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/castor-user-issue-tf4734226.html#a13593512
Sent from the Castor - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to