[
Lists Home |
Date Index |
Thread Index
]
- From: THOMAS PASSIN <tpassin@idsonline.com>
- To: <xml-dev@xml.org>
- Date: Mon, 10 Apr 2000 21:49:07 -0400
Yihpyng Kuan ask about redundancy in xml documents:
> I am new to XML, I have a question here, I wonder if
> anyone can shed some light on it, many thanks.
>
> If I have a table T1(F1 char(10), F2 char(10));
> I have 3 rows for this table.
> The XML representation of this would like this -
>
> <Table>T1
> <Metadata>
> <Column>F1
> <Datatype>CHAR
> <Length>10
> </Length>
> </Datatype>
> </Column>
> <Column>F2
> <Datatype>CHAR
> <Length>10
> </Length>
> </Datatype>
> </Column>
> </Metadata>
> <Data>
> <Row 1>
> <F1>data 1</F1>
> <F2>data 2</F2>
> </Row>
> <Row 2>
> <F1>data 3</F1>
> <F2>data 4</F2>
> </Row>
> <Row 3>
> <F1>data 3</F1>
> <F2>data 4</F2>
> </Row>
> </Data>
> </Table>
>
> I probably have some typo here. But, the problem I see
> here is "if I have 100 rows of data, the above XML
> would repeat this row information with those redundant
> tags 100 times", isn't this a waste ? or, it actually
> is not efficient ? Any better alternative ?
>
Yes, there is redundancy. XML was developed for other purposes, but not for
maximum compaction. XML was intended to 1) make it fairly easy to describe
structure in data, 2) make it fairly easy to extract that structure, and 3)
be reasonably human-readable (among other things). There have been ongoing
discussions on this list about various approaches to compressing xml data.
There is no single, definitive answer. But for many purposes, there is no
need for the utmost in redundancy reduction.
If you want smaller structures, of course, there are many ways to go. But
you would have found it hard to type an example for us to look at in, say,
ASN.1 binary form. Or your tables could have been cast into comma-separated
form. But then, it would be hard to have structure inside of table cells,
for example, which you could easily have with XML.
Tom Passin
***************************************************************************
This is xml-dev, the mailing list for XML developers.
To unsubscribe, mailto:majordomo@xml.org&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/
***************************************************************************
|