Thanks!
I had looked into this somewhat but was a little leery b/c it is marked
experimental for 2.2 (which I think I am locked into using). Also, I am
just about beta and not too excited about such a fundamental change.
Plus, in the end I would still rather not create another node at all if the
return value is always the same. In my environment the extra terminal eats
up graphical space (hard to explain).
|---------+---------------------------->
| | "Nathan Codding" |
| | <[EMAIL PROTECTED]|
| | e.com> |
| | |
| | 11/05/2003 11:53 |
| | AM |
| | Please respond to|
| | xerces-c-dev |
| | |
|---------+---------------------------->
>--------------------------------------------------------------------------------------------------------------------|
|
|
| To: <[EMAIL PROTECTED]>
|
| cc:
|
| Subject: RE: Append Child, Insert Before, Remove Child, and Replace Child
|
>--------------------------------------------------------------------------------------------------------------------|
How about using the DOM UserData mechanism to store each of your wrapper
nodes against the node that it wraps. This way, before you make a new
wrapper node, you can check if you already have one for that node and use
it instead.
As an added benefit, you can also register a UserDataHandler that will get
notified when the original node is deleted, giving you an easy way to tell
when to release your wrapper node.
-Nathan
------------------------
Nathan Codding
PureEdge Solutions Inc
http://www.PureEdge.com
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 05, 2003 9:47 AM
To: [EMAIL PROTECTED]
Subject: Re: Append Child, Insert Before, Remove Child, and Replace
Child
Don't everybody answer at once ;-)
I apologize if this question is obvious or inappropriate, but it is a
behavior of the parser that I haven't been able to definitively classify
yet. So, if anyone could offer any help I would really appreciate it.
The reason that is an issue for me is that I have my own representation of
every node (a wrapper node). So, if a node is returned, I need to create a
new wrapper node. Now, if I create a new node wrapper for a duplicate
node, then it could end up getting released right out from under the second
node without me knowing it....not to mention that it is unnecessary.
Thanks!
|---------+---------------------------->
| | [EMAIL PROTECTED]|
| | m |
| | |
| | 11/04/2003 04:33 |
| | PM |
| | Please respond to|
| | xerces-c-dev |
| | |
|---------+---------------------------->
>--------------------------------------------------------------------------------------------------------------|
|
|
| To: [EMAIL PROTECTED]
|
| cc:
|
| Subject: Append Child, Insert Before, Remove Child, and Replace
Child |
>--------------------------------------------------------------------------------------------------------------|
Each of these methods returns a node that was passed to as an input
parameter. My question is whether the return value is always the same as
the input value.
For example, if I pass DOMNode foo to replaceChild as the OldChild, will
the return value of the function always be foo? I need to know if my code
needs to check for the return value or if I can assume that the value is
always the same.
Note: In the past I had been led to believe that they were always the same,
but I wanted to check this before my code goes beta.
Thanks!
---------------------------------------------------------------------
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]
---------------------------------------------------------------------
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]