Hello, I have an XSD which defines a generic "Trade" (with some common elements) In that XSD, I subclass TradeType into "Bond" and "Equity" (with trade specific elements, inherited by "extension")
When I build the java Castor objects, I get the following methods: getBond(index) getBondCount GetEquity(index) getEquity(Count) What I really want is a "getTrade(index)" and "getTradeCount()" which give me everything for both Equity and Bond (and which I can cast into Equity and Bond later) As I add new subclassed trade types (ie, "Swap"), I'd like it so my code doesn't have to change (everything is initially referred to as "Trade"). Right now I have to loop through getBond and getEquity. Any idea how to do this? TIA -George -------------------------------------------------------- This message w/attachments (message) may be privileged, confidential or proprietary, and if you are not an intended recipient, please notify the sender, do not use or share it and delete it. Unless specifically indicated, this message is not an offer to sell or a solicitation of any investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Merrill Lynch. Subject to applicable law, Merrill Lynch may monitor, review and retain e-communications (EC) traveling through its networks/systems. The laws of the country of each sender/recipient may impact the handling of EC, and EC may be archived, supervised and produced in countries other than the country in which you are located. This message cannot be guaranteed to be secure or error-free. This message is subject to terms available at the following link: http://www.ml.com/e-communications_terms/. By messaging with Merrill Lynch you consent to the foregoing. --------------------------------------------------------

