[Omaha.pm] database -> XML
George Neill
georgen at neillnet.com
Mon Apr 30 08:22:45 PDT 2007
Quoting Rob Townley <rob.townley at gmail.com>:
> Several years ago, elements were better.
There's no good answer, I believe it depends what you are trying to
do. Elements are nice because they are extendible/readable ... but
lengthy at times. Take a look at the link Jay provided, the author
makes good sense.
An example,
<records>
<record>
<id>0</id>
<fields>
<field>
<name>lastname</name>
<length>20</length>
</field>
<field>
<name>city</name>
<length>28</length>
</field>
<field>
<name>zipcode</name>
<length>5</length>
</field>
</fields>
</record>
</records>
I find overkill. But apparently the M$ tools ('code generators')
slurp the above xml without having to write a lick of code. I would
prefer something in the middle.
<records>
<record id="0">
<field name="lastname">
<length>20</length>
</field>
<field name="city">
<length>28</length>
</field>
<field name="zipcode">
<length>5</length>
</field>
</record>
</records>
Later,
George.
More information about the Omaha-pm
mailing list