From: Ben Schumacher Date: 2003-08-29T07:07:49+09:00 Subject: Re: [ANN] QuiXML 0.0.0 Sean O'Dell said: > My reason for treating content as a single value is because I've only > ever used XML for data, and never as a formatting stream, like HTML. > That's basically all there is to it, really. I used XML a lot for > configuration files, blocks of data (such as for client accounts) and > for passing commands/data between remote machines. > > I'm open-minded about it though. Except for formatting streams, such as > HTML and source XML documents for XSLT to transform into something else > like PS or what-not, I couldn't think of a reason to NOT combine all of > an elements data into one content property, so I did that. > > How would you like to see it changed? Give me an idea of what I could > do different. Put each scrap of content data in a child element, and > mark it as data instead of a node? I think this could be done relatively easily. The children member variable is a simple array, correct? And it contains hashes that map to name, content and children, correct? Why couldn't it, then, just contain a Ruby string if its CDATA, instead of a hash, for a node? > It would be pretty easy to disable pretty printing, of course, and also > stripping whitespace when parsing. Very simple changes. I don't really believe in stripping whitespace, necessarily, but I bet some folks think its a fine idea. My personal preference is to have the ability to get out exactly what I put in -- meaning if I have some whitespaces in places, then they probably belong there. For my use, it makes more sense, but I understand that some folks will disagree on this issue. Cheers, bs.