1 |
On 03/23/2014 19:18, Kent Fredric wrote: |
2 |
> On 24 March 2014 11:54, Joshua Kinard <kumba@g.o> wrote: |
3 |
> |
4 |
>> That said, Is XML that specific that every single atom has to be wrapped by |
5 |
>> an individual tag? A comma-separated list of values in its own XML tag is |
6 |
>> prohibited by the spec? I don't use XML often (if at all), so I am not |
7 |
>> familiar with its intrinsics. |
8 |
>> |
9 |
> |
10 |
> |
11 |
> By nesting CSV inside XML, you've now got 2 formats to deal with instead of |
12 |
> 1. |
13 |
> |
14 |
> In pure XML, you can get a properly decoded array of tag elements with a |
15 |
> simple XPath query: |
16 |
> |
17 |
> //tag |
18 |
> |
19 |
> But with CSV-in-a-tag you have to extract the tag and subsequently parse it. |
20 |
|
21 |
I am probably thinking from a Python perspective then. All you have to do |
22 |
is grab the value of <tags> and then split it on the comma. No custom |
23 |
parsing needed, since that function is built into Python. I guess this |
24 |
might not be the case with other languages, though, and it really just adds |
25 |
to my distaste of XML as a format for metadata.xml in the first place. |
26 |
|
27 |
|
28 |
> So you're hand implementing a parser to parse parts of XML that already |
29 |
> convey data without needing to hand-parse. |
30 |
> |
31 |
> Which is more effort for everyone who touches the file, not less. |
32 |
> |
33 |
> Add to that automated ways to update the tags ( again, having to implement |
34 |
> a custom serialiser in addition to the custom parser ) and its just not |
35 |
> worth the tiny amount of savings. |
36 |
> |
37 |
> Because really, if space efficiency was #1 priority, we'd not be using XML |
38 |
> at all, let alone XML with pesky whitespace indentation that consumes |
39 |
> needless bytes. =) |
40 |
|
41 |
I guess I need to start looking for used TARDISes then... |
42 |
|
43 |
Thanks for the explanation. |
44 |
|
45 |
-- |
46 |
Joshua Kinard |
47 |
Gentoo/MIPS |
48 |
kumba@g.o |
49 |
4096R/D25D95E3 2011-03-28 |
50 |
|
51 |
"The past tempts us, the present confuses us, the future frightens us. And |
52 |
our lives slip away, moment by moment, lost in that vast, terrible in-between." |
53 |
|
54 |
--Emperor Turhan, Centauri Republic |