Nevermind. I found the answer to my question at "How
to map a map/hashtable of elements"
http://www.castor.org/how-to-map-a-hashtable.html
Sorry for asking too soon.
Thanks.
--- "S. Sharif" <[EMAIL PROTECTED]> wrote:
>
> Hi,
> I have an xml document of the following format
>
> <Document>
> <LOGIN_LIST filter="Primary">
> <LOGIN>
> <USERID>testuser1</USERID>
> <PASSWORD>password1</PASSWORD>
> </LOGIN>
> </LOGIN_LIST>
> <LOGIN_LIST filter="Secondary">
> <LOGIN>
> <USERID>testuser2</USERID>
> <PASSWORD>password2</PASSWORD>
> </LOGIN>
> </LOGIN_LIST>
> </Document>
>
> And I would like to unmarshall this xml into an
> Object
> containing a Hashtable collection, with LoginList
> (LOGIN_LIST) objects as the value and the filter
> attribute as the key for the Hashtable. So that in
> my
> code, I could do something like this:
>
> Document document = (Document)
> unmarshaller.unmarshal(reader);
> LoginList primaryLoginList = (LoginList)
> document.getLoginLists().get("Primary");
> LoginList secondaryLoginList = (LoginList)
> document.getLoginLists().get("Secondary");
>
> How do I go about writing the FieldHandler for this?
>
> I already read the page regarding "Writing Custom
> FieldHandlers"
> http://www.castor.org/xml-fieldhandlers.html
>
> But that does not explain how to implement the
> situation that I just described. Any help would be
> very much appreciated.
>
> Thanks.
>
>
>
**********************************************************
> * Saladin Sharif
> * e-mail: [EMAIL PROTECTED]
> * Visit homepage @ http://gaia.ecs.csus.edu/~sharifs
>
**********************************************************
>
>
>
>
____________________________________________________________________________________
> Expecting? Get great news right away with email
> Auto-Check.
> Try the Yahoo! Mail Beta.
>
http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html
>
>
>
---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
____________________________________________________________________________________
Now that's room service! Choose from over 150,000 hotels
in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email