Rob- It probably isn't too helpful, but my first reaction would be to use an XQuery processor to slice up the XML file and then unmarshal the result in Castor. You might look into the listener interfaces in Castor (I'm thinking UnmarshalListener), but I don't think those offer any control, just event notification. Another option is to create a ContentHandler that sits between the parser and Castor that only sends Castor the events that you want it to receive. There might be an easier way to do this, but those are the off-the-top-of-my-head solutions...
If you get a solution that works, please let us know, as it will probably help others in the future. Stephen On 3/28/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm unmarshalling an xml in which there can be multiple instances of the > same node-type. Within each node is an identifying string that tells me to > what the information contained in the node pertains. I only need information > from one node with a particular identifying string. Is there any way to > check that string prior to the unmarshalling? In other words, I want to > avoid unmarshalling all the nodes into a collection of objects and looking > for the specific string by iterating through the collection. I'd rather > check before the unmarshalling so I only one object (that corresponds to > that node) gets instantiated. > > Any ideas? > > Thanks, > Rob > > ----------------------------------------- > Robert Lerner > Senior Consultant > Vichara Technologies, Inc > 646-344-3541 > > ________________________________ > > > > > > > ******************************************************************* > **** > This E-mail is confidential. It may also be legally privileged. If > you > are not the addressee you may not copy, forward, disclose or use > any > part of it. If you have received this message in error, please > delete > it and all copies from your system and notify the sender > immediately > by return E-mail. > > Internet communications cannot be guaranteed to be timely, secure, > error or virus-free. The sender does not accept liability for any > errors or omissions. > ******************************************************************* > **** >

