5 ms·
I agree that it is verbose, but I am not convinced that S-expressions are the solution. In a complex, deeply nested XML document, you should be able to tell whe
by mercurial 12y ago
I agree that it is verbose, but I am not convinced that S-expressions are the solution. In a complex, deeply nested XML document, you should be able to tell where a given tag is inserted without counting parentheses.
> there is no obvious way to transform any xml to an object (pojo is the best aproxymation, but how do you differentiate between a sub-tag, a text node, and an attribute?)
That's OK. Just don't use XML to serialize data structures. IMHO, the use cases at which it is good are a lot closer to use cases for which HTML works than when you hesitate between XML and JSON.
> it's essentially typeless (how do you serialize a number? how to differentiate it from a string? from a boolean?)
That's not entirely wrong, but you can enforce a lot of things via XML schemas (eg, something like XSD or RelaxNG).
- ExpiredLink 12y ago> you can enforce a lot of things via XML schemas (eg, something like XSD or RelaxNG). XML is structured text that can be validated. XML's biggest selling point!