LWN.net Logo

Stanse

Stanse

Posted Oct 16, 2009 21:29 UTC (Fri) by oak (subscriber, #2786)
In reply to: Stanse by vomlehn
Parent article: Stanse

> XML is pretty darn simple

Simple? Yes[1].
Readable? No[2].

[1] to some definition of simple, see the XML spec (namespaces etc).
[2] not by humans, due to its bad noise/signal ratio. XML is intended (as
a slowdown) for automated processing.


(Log in to post comments)

Stanse

Posted Oct 16, 2009 21:47 UTC (Fri) by dlang (✭ supporter ✭, #313) [Link]

I think the readability depends heavily on the schema that's selected for the XML.

what most people end up using is insane, but I believe that properly used it can be good.

many people do something like
<xml>
<group type='user'>
<name>
data
</name>
<address>
data
</address>
</group>
<xml>

which I agree is horrible to deal with

however if you did something like this instead
<xml>
<user name='data' address='data' />
<xml>

I think it's reasonable.

my view is that if the item of data can only appear once it should be an attribute, only if it can appear multiple times or can have something else inside it should it be an element (and even there I sometimes 'cheat' by making the data be a comma separated list)

Stanse

Posted Oct 18, 2009 4:51 UTC (Sun) by dang (guest, #310) [Link]

So use any of the many off the shelf tools and access the underlying data structure through a friendly UI? You'd kinda want to do that anyway so that you could validate your edits against the schema, no?

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds