Hacker News new | ask | show | jobs
by layer8 1007 days ago
If you interpret the start and end tags of the child elements as syntax indicating the type of each value, then those tags are analogous to, say, the quotes that enclose a string literal. In other words, in

    <foo>hello</foo>
    <foo>world</foo>
the <foo> and </foo> serve the same purpose as the double quotes in

    "hello",
    "world"
with the added benefit that the type system can be much richer (i.e. not everything is just a nondescript string value).

And you don’t even need a comma to separate the values! ;)