[Omaha.pm] database -> XML

Rob Townley rob.townley at gmail.com
Tue May 1 08:59:51 PDT 2007


On 4/30/07, George Neill <georgen at neillnet.com> wrote:
>
> 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.
>
> _______________________________________________
> Omaha-pm mailing list
> Omaha-pm at pm.org
> http://mail.pm.org/mailman/listinfo/omaha-pm
>


Even though i argued for using XML in about everything, the verbosity of
many of XML projects subconsciously drove me away from programming, in
particular, the XML MS products would spew out.  However, judicious use of
namespaces would help some.   i remember having  trouble with some of the
dtd's  when  using a namespace version of an xml doc, so i wasn't able to
use namespaces back then as much as i would have liked.

<records using namespace or however a ns is declared.>
     <id>0
      <ns:fname>lastname</>
      <flength>20</>
      <fname>city</>
      <flength>28</>
      <fname>zipcode</>
      <flength>5</>
     </id>
</records>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/omaha-pm/attachments/20070501/0625a71e/attachment.html 


More information about the Omaha-pm mailing list