Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Why XML!!!!

843834Jun 15 2001 — edited Jun 20 2001
Doesnt XML duplicate lot of data? I have worked with EDI files and I feel so. See the example below:

<Address>
<Name>Sanjaya</Name>
</Address>

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:

<Address>
<Name>Sanjaya</>
</>

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

Thoughts????????

...........................................
sanjaya_ganesh@yahoo.com

Comments

843834
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
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.
cheers
anand
843834
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....

-Sanjay
843834
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?

Srini.
1 - 4
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jul 18 2001
Added on Jun 15 2001
4 comments
43 views