Re: simple dom implementation

Depends on the value. If it's a manefest constant, #define or a static 
final value is probably the right answer; if it's a value that varies from 
node to node, you want an exposed field or a getter method or something of 
that sort. (I'd suggest the getter, personally.)

Note that some C++ implementations already exist; even if you're writing 
your own, you might want to look at their APIs as examples. See 
http://www.w3.org/DOM/Bindings for some of them. Note that in C++ you have 
to make a difficult decision about memory management, which the reference 
bindings were able to dodge since they were written in garbage-collected 
languages.

______________________________________
Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL and more. 
"may'ron DaroQbe'chugh vaj bIrIQbej"  ("Put down the squeezebox and nobody 
gets hurt.")

Received on Tuesday, 8 April 2003 16:47:02 UTC