On 03/23/2014 19:18, Kent Fredric wrote:
> On 24 March 2014 11:54, Joshua Kinard <ku...@gentoo.org> wrote:
> 
>> That said, Is XML that specific that every single atom has to be wrapped by
>> an individual tag?  A comma-separated list of values in its own XML tag is
>> prohibited by the spec?  I don't use XML often (if at all), so I am not
>> familiar with its intrinsics.
>>
> 
> 
> By nesting CSV inside XML, you've now got 2 formats to deal with instead of
> 1.
> 
> In pure XML, you can get a properly decoded array of tag elements with a
> simple XPath query:
> 
>           //tag
> 
> But with CSV-in-a-tag you have to extract the tag and subsequently parse it.

I am probably thinking from a Python perspective then.  All you have to do
is grab the value of <tags> and then split it on the comma.  No custom
parsing needed, since that function is built into Python.  I guess this
might not be the case with other languages, though, and it really just adds
to my distaste of XML as a format for metadata.xml in the first place.


> So you're hand implementing a parser to parse parts of XML that already
> convey data without needing to hand-parse.
> 
> Which is more effort for everyone who touches the file, not less.
> 
> Add to that automated ways to update the tags ( again, having to implement
> a custom serialiser in addition to the custom parser ) and its just not
> worth the tiny amount of savings.
> 
> Because really, if space efficiency was #1 priority, we'd not be using XML
> at all, let alone XML with pesky whitespace indentation that consumes
> needless bytes. =)

I guess I need to start looking for used TARDISes then...

Thanks for the explanation.

-- 
Joshua Kinard
Gentoo/MIPS
ku...@gentoo.org
4096R/D25D95E3 2011-03-28

"The past tempts us, the present confuses us, the future frightens us.  And
our lives slip away, moment by moment, lost in that vast, terrible in-between."

--Emperor Turhan, Centauri Republic

Reply via email to