Like in java, using only XMLObject's typed methods you have to set each field.
But if you use XMLCursor API (which is not typed) you can copy or even better (performance wise) move content from a to b. Cezar > -----Original Message----- > From: Stefan Lischke [mailto:[EMAIL PROTECTED] > Sent: Thursday, September 27, 2007 4:09 AM > To: [email protected] > Subject: copy constructor for inherited types? > > hi there, > > I have to xsd types. Type A and B. B extends A and adds another element. > > In source i have an instance of A and want to create a new instance of B > from A. > > Any ideas? something like B.Factory.newInstance(A) for example? or do i > have to copy all fields by myself? > > I tried with B.set(A) but B gets orphaned after this and i cannot set > the value of the extended Element of B > > thanx in advance > > Stefan Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affiliated entities, that may be confidential, proprietary, copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

