XMl - DTD and Table Definition
Michael.Kay at icl.com
Mon Jun 14 16:44:18 BST 1999
> I am in the area of XML! Now I have to export and import
> large databases via XML-format. This data are structured in typical
> master-detail relations (1 master have approximatly 15 to 25 details
> exportfile have 30000 - 500000 master elements).
> If I write the details records like the standard XML format, shown in
> serveral books and samples via www, I waste a lot of space
> for Start-End-Tag's. To minimize the filesize, I decide to use the
The "standard" format you refer to (presumably something like
is not a standard at all, it is merely a convention that many people use.
If space is a concern (and with big databases it certainly is) there are
several other approaches possible:
1. Compress the file using a standard compression utility.
2. Use shorter tags ( e.g. <A> for <AUTHOR> )
3. Identify columns by position rather than by name, for example:
<BOOKS COLUMNS="AUTHOR TITLE">
This is similar to using TABLE & TD as you suggest (but shorter). You need
to think about how to represent null values, though: and if there are very
many nulls, you can end up using more space than with the named columns
4. If space is really tight you could even shorten the above to:
(where the empty tag <S/> acts as a separator); but you're starting to make
it more difficult to parse, eliminating the benefits of using XML in the
> Is this allowed in a "well-formed" XML document?
Yes, you can use tags to mean anything you like so long as they are properly
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)
More information about the Xml-dev