File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes Alternatives to XML and why is it still used ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Alternatives to XML and why is it still used ?" Watch "Alternatives to XML and why is it still used ?" New topic
Author

Alternatives to XML and why is it still used ?

Andy Jack
Ranch Hand

Joined: Nov 22, 2012
Posts: 257
I read this in a book - beginning xml -
A big disadvantage of this metadata, however, is the consequent increase in the size of the fi le. The
metadata adds about 130 extra characters to the fi le’s original 43 character size, an increase of more
than 300 percent. The creators of XML decided that the power of metadata warranted this increase
and, indeed, one of their maxims during the design was that terseness is not an aim, a decision that
many would later come to regret.


Well, if xml is inefficient, then why do we still use it ?
What are the alternatives to xml that also overcome this inefficiency ?

Java Newbie with 72% in OCJP/SCJP - Super Confused Jobless Programmer.
I am a "newbie" too. Please verify my answers before you accept them.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
Efficiency in terms of file size is way way way down my list of priorities - here are a few points I like about XML

1. Human readable and editable - makes it possible to create data sets by hand if necessary, easy to test error processing by editing the XML, so so so much easier to explain to another programmer what is going on, you can even annotate with comments.

2. With good design you can add new data types to an existing XML document without having to modify existing programs that use the XML

3. XML can represent quite complex data structures

4. Note that there are efforts to make XML compact - see Fast Infoset

Alternatives:

1. Properties file ( name = value, one per line) - fast and compact but only for simple data structures

2. JSON - gaining in popularity, human readable and editable


Bill



chris webster
Bartender

Joined: Mar 01, 2009
Posts: 1615
    
  13

Also worth bearing in mind that a lot of effort has been put into establishing standard XML-based interchange formats for all kinds of data - office docs, mapping data, financial data, etc etc - specifically to allow different systems to communicate via an accepted neutral format, and these standards are now widely used. So even if I could replace a particular XML standard with a "better" standard using an alternative technology like JSON, I'd still need to persuade all the other people who use the XML standard to do likewise, or I have to support two standards until all the users have made the switch to the new one. That's a lot of work and negotiation for not much benefit. If it ain't (too) broke, don't fix it.

There are lots of good and bad things about the use of XML, and I'm certainly keen to use alternatives whenever they're available, but there is also a lot of "legacy" XML out there (and a lot of inertia) that would have to be dealt with to replace it completely. Still not too convinced by that "human-readable" argument though...


No more Blub for me, thank you, Vicar.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Alternatives to XML and why is it still used ?
 
Similar Threads
XML and BLOBs
ArrayList vs LinkedList?
XML vs Database
Tomcat Startup problem
Tomcat and Optimizeit throwing Out of memory error