Hi, I think that your only option is writing your own field handler to treat the attributes of <something> specific to your needs.
Have a look at http://castor.org/xml-fieldhandlers.html for instructions on how to go about creating one. Thanks Werner > -----Ursprüngliche Nachricht----- > Von: D whysomanywhy [mailto:[EMAIL PROTECTED] > Gesendet: Freitag, 26. Jänner 2007 15:05 > An: [email protected] > Betreff: [castor-user] unmarshall tag's attributes into java object's > HashMap field? > > say there's a xml fragement > <something attr1="val1" attr2="val2"/> > > and, the java object: > class Something{ > private Map attrs = new HashMap(); > } > > I want to unmarshall the attr1 and attr2 into Something's attrs field, > or, on opposite, marshall the attrs of Something java object into XML > tag something's attribute? > > I tried org.exolab.castor.mapping.MapItem, but no result got, any > comments? > > --------------------------------------------------------------------- > To unsubscribe from this list please visit: > > http://xircles.codehaus.org/manage_email --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email

