From: Eric Will Date: 2008-09-28T07:10:31+09:00 Subject: Re: parsing xml (xmpp) with ruby On Sat, Sep 27, 2008 at 5:39 PM, Robert Klemme wrote: > Well, this is not true. You can have multiple classes cooperating in doing > XML stream parsing. You need one instance for receiving the events but that > can delegate to any number of other instances. A scheme I usually use is to > have a class per element type and the front end instance keeps a stack of > those. This is how I'd implement it. I just don't wanna. > Typically XML is parsed to instantiate classes of a particular object model > that is built do implement the business logic (in your case message > exchange). It is a waste of resources to create an XML DOM and then > traverse it in order to transform it into other objects. Also, not all > input data is needed in every case. That's why stream parsing has serious > advantages over DOM parsing. The thing is, I'm only parsing out like 5-10 objects at a time. It's nothing huge to transverse, but I'm thinking it'll be a hard performance hit to keep on like that when I try to scale. > robert -- rakaur