Forum Stats

  • 3,852,474 Users
  • 2,264,108 Discussions


Why XML!!!!

843834 Member Posts: 49,972
edited Jun 20, 2001 3:58AM in Java Technology & XML
Doesnt XML duplicate lot of data? I have worked with EDI files and I feel so. See the example below:


The only meaningful data is Address-Name-Sanjaya!!
For each of the tags Address/Name we duplicate the data again.

Assume I always write a WELL-FORMED XML. Then I know each tag ends before its parent ends, right? So cant I just utilise this knowledge as below:


A depth based stack push-pop will very easiliy be able to produce the same effect as the first case.


[email protected]


  • 843834
    843834 Member Posts: 49,972
    Your idea is interesting. But then, XML is an SGML derivative that follows standards laid down by its parent. I guess what you are suggesting is another standard.

    I do not completely agree with ur point that XML start & end tags duplicate information. Rather it improves readability of the document.

    Its always better to say bValidationRequired than bValReq, the intrepretations could vary on the latter.

    Just my thoughts.
  • 843834
    843834 Member Posts: 49,972
    Hi Sanjaya,
    in ur case there are only 2 elements. when there are lot of elements in ur xml file, not ending with the closed tag with the element name will lead to a confusion & especially when u start writing transformations it would be more tedious.
  • 843834
    843834 Member Posts: 49,972
    Hi All:

    I think you missed a point!! Why do I want readability. I think I am not going to write Email in XML:-):-). It is data exchange mode between programs. I think in that case I will have to say: TCP/IP is not readable :-).

    AT least for those cases, where programs talk to each other, you DO NOT need human readability.

    Nice to hear all your ideas. So nice....

  • 843834
    843834 Member Posts: 49,972
    Hey Sanjay,

    Well you mentioned that readability in XML scores low when it is used for exchanging data. I am pretty sure that XML is NOT only intended for data exchange. It is useful in other situations too. Think of XML Content Mgmt (just to say). You definitely need readability here, thou the actual content may be published in a totally diff way.

    XML's main purpose is to have custom document structure. It is data/Content driven. Anything that is data centric, MUST be readable too. Why do you have custom document structure is another question and ur point (data exchange) comes into picture as well :-).

    Do you agree now?

This discussion has been closed.