Hi Ihar, Ihar Tsimoshka wrote:
> Hi, Jörg. > > Due http://xstream.codehaus.org/manual-tweaking-output.html "correct" > fields order is 'the sequence they are defined' - without any restrictions > in different runtime environments. Since it doesn't happen in Android, > Xstream does not support Android. Am I right? No. XStream is Java to XML and back. Nothing less, but nothing more in first place. And that's what it does also on Android. Any additional requirement concerning the XML (element naming, value formatting or element sequence) is an external requirement and not necessary for XStream to work at all. If Android obviously does not deliver the field elements in their declaration sequence, it is nothing that XStream can "fix", because the information is then simply not available at runtime. But it does not stop XStream to persist the object graph and read it back. And as said earlier in this thread, the sequence is defined by the compiler used to compile the class. XStream is highly configurable and can be adjusted in a lot of ways (e.g. you could use a field sorted that reads the "correct field" order from an annotation in the provided type), but it cannot make wonders and create information out of thin air. Actually I'd be surprised if you get different results with JAXP, since even this package will create the stub Java classes from the compiled data classes. - Jörg --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
