Hi, _why,
Though I’m an author of SOAP4R,
I’m looking YAML and yaml4r interestingly.
From: “why the lucky stiff” ruby-talk@whytheluckystiff.net
Sent: Tuesday, October 29, 2002 12:58 AM
Your comments suggest YAML can easily step for XML, though that previous
YAML spec link suggests potentially significant structural/conceptual
differences between the two.YAML cannot step for XML. The two are completely different. When it comes to
interleaved content and markup, YAML cannot tread water. Certainly use XML
in cases requiring such.
I agree. But half (or more?) of XML use is data-oriented,
in other words, there’s no mixed content. YAML has enough
for these usage.
Though I scanned YAML spec only once, YAML spec includes
functions which are equivalent for XML, XML Namespace(sort-of),
SAX(stream model), DOM(tree model), XML Schema Datatypes
Part2(build-in types), and SOAP Encoding(Collection and Mapping).
Users can get big benefit of many functions from YAML
without knowing detail of above specs.
Let’s ask the inverse question: Can XML easily step for YAML? XML is squeezed
into many case where I believe it doesn’t suit as well. Configuration files,
messaging, data serialization. YAML is engineered for these cases.
I agree, except data serialization.
I know YAML can serialize heavy-complexed such as map in map
in array in …, including multi-ref object. But editing a
YAML-serialized text of heavy-complexed object is as difficult
as editing one of XML-serialize, I think. We need special
viewer/editor to add a node, cut-and-paste a text, etc.
As for this point, XML has an advantage for now.
Again, I completely agree with YAML is suitable for not
complexed object serialization, such as configuration files,
lightweight messaging. And within scripting language world,
users doesn’t often care its type system. (Without explicit
type declaration, YAML serialized text is much smarter.)
For me, it’s a simple trade-off thing.
Correct me if I’m wrong.
Regards,
// NaHi