These features are present because xml is a tree whereas javabeans can form a directed graph. The setXXX methods all copy their argument to assure that no XmlObject has more than one parent. I think you want to use the addNewXXX methods on the parent object instead of newInstance on the object's factory: the add methods create a new subelement that is already a child of the parent and avoids copying.

thanks
david jencks

On Aug 8, 2005, at 8:10 AM, Roman Seidl wrote:

Dear XMLBeans-Users / Developers,

i run another Test and now found out, that the following test passes:

       UserDocument user = UserDocument.Factory.newInstance();
       user.setUser(UserType.Factory.newInstance());
       UserType ut = user.getUser();
       ut.setEmail("haasnsi");
       ut.setAge(1232);
       ut.setEmail("hansi");
       ut.setFirstname("hias");
       assertEquals(user.getUser().getEmail(), "hansi");

So obviously it only fails to update the parents UserType Document when i assign it an the reuse the old reference. Is this documented? Is there a way to get around this problem - besides getting the new reference from the parent (the questions from the last email persist...)?

thanks!

cheers
roman

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to