>
> >DOM_Node* nodePtr = new DOM_Node(node);                      //
> calls copy
> contructor
>
> May work in some implementations. Won't work in others. May not work in
> future releases of this DOM, and if it stops working you have
> only yourself
> to blame.
>
> Node.cloneNode() is a portable way of doing the same thing.

No, it isn't...cloneNode creates a new DOM_Node without a parent. What I do
is have a pointer to an existing DOM_Node (rather like a pointer to a
smartpointer). It is _not_ outside the official DOM API; DOM_Nodes must have
a copy constructor.

>
> Basic advice: If you don't absolutely have to step outside the
> official DOM
> API, _don't_. The whole point of working wih a defined API is code
> robustness and portability.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to