|
|
|
|
|
by _ZeD_
4092 days ago
|
|
the problems with xml (as in "outside the XML-RPC, XMLSchema, XSLT, SOAP stuff") IMHO arises these two / three points * it's a little too verbose (<xml></xml>.. while even S-expressions use just ')' as terminator) * 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?) * it's essentially typeless (how do you serialize a number? how to differentiate it from a string? from a boolean?) |
|
> 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).