Hi,

I have a document that looks like:

<root>
      <a> <b> ..</b> <b> ..</b><b> ..</b><b> ..</b></a>
      <a> <b> ..</b> <b> ..</b><b> ..</b><b> ..</b></a>
        ....
      <a> <b> ..</b> <b> ..</b><b> ..</b><b> ..</b></a>
  </root>


If I only want to know how many <b> elements under first <a> element , it 
seems that castor needs to unmarshal the whole document and then from root 
to get first A object and then get the counts of B objects from the A 
object. This means a lot of other non-related objects will need to be 
created before I can finally know the number of B objects under A. For 
large document, it takes relative long time to unmarshal the whole 
document  and wastes a lot of memory to hold other objects.

As a second example, if I am interested in only the second <a> element 
information, for example, it is a customer information I need to 
manipulate, Castor also needs to unmarshal the whole document before I can 
get to the second A object.

So I am wondering if there is some ways to unmarshal only part of the 
document based on something like XPath as a argument?

Many thanks,

Risheng

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to