> > You are been able to set it without this additional declaration: > xstream.omitField(Y.class, "z"); > > What's the purpose of the generated XML? Do you want to deserialize it > later > on? > > Cheers, > Jörg >
Jörg, Right you are! That's better yet. I tried using omitField, but I was thinking that the base class would be the one where XStream would pick up the values of the upper-level classes. So I had something more like omitField(X.class, "z"), which of course didn't work. This is my first XStream work, so newbie stuff I guess. Purpose: I will deserialize later, but the values I'm omitting are for an underlying UI framework whose values will not be relevant at the time of deserializing. So I'm happy to not have those values populated anyway. I just want the values of the base object. No super class values are required at all. Thanks Jörg! - Eric
