XMLParser, NQXML, REXML,

Hi, _why,

Though I’m an author of SOAP4R, :slight_smile:
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. :slight_smile:
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

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.

I think so, too.

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.

Yes, great point. Last night at RubyConf someone mentioned this
as well. (The viewer/editor idea.) Basically, all we really need
is a viewer/editor for Ruby data structures. Then, load from YAML
documents or dump to. Might even be useful for editing Ruby objects
serialized with Marshall.

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.)

We’re in the process of making the type system more flexible.
Actually, it’s not so much a change in the type system, but a change
in what happens at the Parser level and what happens at the Loader
level. Because if some users simply won’t benefit from the typing,
then let’s not waste their time trying to figure out typing. Expose
an earlier representation of the objects for them to access. Of
course, you don’t get the same quality of serialization at this
level, but some developers can afford that.

_why

···

NAKAMURA, Hiroshi (nahi@keynauts.com) wrote:

Now that’s what I call sanity! If only the W3C were able to grasp that
simple but impeccable logic …

···

On Sun, Nov 03, 2002 at 12:20:02AM +0900, why the lucky stiff wrote:

level. Because if some users simply won’t benefit from the typing,
then let’s not waste their time trying to figure out typing. Expose
an earlier representation of the objects for them to access.


Matt Gushee When a nation follows the Way,
Englewood, Colorado, USA Horses bear manure through
mgushee@havenrock.com its fields;
http://www.havenrock.com/ When a nation ignores the Way,
Horses bear soldiers through
its streets.

                        --Lao Tzu (Peter Merel, trans.)