Object serialization XML vs java serialization

P

plasticfloor

I was wondering are there really advantages to using XML serialization
for object or is it just an xml hype?
 
M

Matt Humphrey

I was wondering are there really advantages to using XML serialization
for object or is it just an xml hype?

I use XML serialization because
it's no more difficult than binary serialization,
I can read (view directly) the results as text when needed,
I can manually edit the serialized data
I can transform serialized data using XSL
I worry less that changes to Java will invalidate the serialization
It transfers easily across HTTP
I usually (but not always) don't care that it might be larger or a
little slower

Cheers,
Matt Humphrey (e-mail address removed) http://www.iviz.com/
 
A

Andrew McDonagh

Matt said:
I use XML serialization because
it's no more difficult than binary serialization,
I can read (view directly) the results as text when needed,
I can manually edit the serialized data
I can transform serialized data using XSL
I worry less that changes to Java will invalidate the serialization
It transfers easily across HTTP
I usually (but not always) don't care that it might be larger or a
little slower

Cheers,
Matt Humphrey (e-mail address removed) http://www.iviz.com/

Seconded, plus:

it allows for schema evolution (i.e. should we later change the class,
we can easily change the XML to suit the new version).

Its JVM version independent.
 
H

hawat.thufir

Matt Humphrey wrote:
[...]
I can read (view directly) the results as text when needed,
[...]

Not that you'd often want to, but that capability sounds good :)


-Thufir
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top