[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is DOM vs SAX a red herring?
Karl Auerbach <karl@cavebear.com> writes:
> From my experience with doing SNMP set operations, the major job of the
> agent is to gather all the pieces of the proposed configuration change
> together and do a consistency analysis. That kind of testing can easily
> be the largest part of the agent in a managed device.
>
> If one is doing that kind of evaluation of the proposed configuration data
> - and I suggest that any device that doesn't do it is taking quite a risk
> - then there will be a time when most of the proposed configuration data
> is going to have to be simultaneously resident in memory.
>
> It seems to me, therefore, that I am going to be paying the memory price
> of a DOM-like data tree even if I use SAX.
But by that time, you've been able to convert the text of the XML into
an internal and much more compact form - you don't need to keep the
full text around. In order to resolve the namespaces correctly, you
need the full text (at least up to the end of the start/empty
element.
The general rule of using attributes primarily as modifiers has
proven to be a good one even in traditional document production
applications. But as others have said, it's advice to the unwary, not
a hard and fast rule.
--
Scott Lawrence
Actively seeking work
http://skrb.org/scott/
[ <lawrence@world.std.com> is deprecated ]
--
to unsubscribe send a message to xmlconf-request@ops.ietf.org with
the word 'unsubscribe' in a single line as the message text body.
archive: <http://ops.ietf.org/lists/xmlconf/>