Roedy said:
SEE I told you this would happen! XML needs to be put on a diet and
made faster to parse.
see
http://mindprod.com/jgloss/xml.html
from that page:
There is no mechanism to describe the types of the data. To XML, everything
is a string. There is no way to specify a field must be numeric, that in
needs two decimal places, that it must represent a date in some range, that
it must not have accented letters, that it be restricted to certain
punctuation, or be one of a certain set of legal values. There are scores
of tack-ons trying to fix this and other shortcomings turning the simple
XML into a tower of Babel.
-> That's what XML Schema mostly solves. you hava datatypes, constraints,
regexes, ...
XML uses a ugly syntax with gratuitous punctuation. #IMPLIED really means
optional. #PCDATA means string <!ATTLIST means attributes.
-> that is a problem with DTD's, not XML itself: DTD's are ugly, not
powerfull and not written in XML itself, once again XML Schema solves
these problems.
One possible candidate for the XML replacement job is the Java serialised
object format. It can handle just about any data structure imaginable. It
is platform independent. It has a simple DTD -- Java source code for the
corresponding class. Some claim it is Java-only. Not so. It is no more
difficult for C++ to parse than any other similar newly concocted protocol.
It is not tied to any hardware or OS. It is just that Java has a head start
implementing it. Java can implement it with no extra overhead.
-> funny when you consider that, for long term persistence, Sun recommends
that you save your beans using the XMLEncoders. that is the problem with
the Java serialisation: binary compatibility has issues, XML solves those.
You're right on the performance issues ofcourse