First, please note that I'd find it easier to respond to your messages
if they didn't have an AdWorks image embedded in them.  My e-mail client
(Outlook 2003) blocks the image, but won't reply without downloading it.
I don't want to download the image, so its inclusion effectively
prevents me from replying.  Outlook is widespread, so I doubt I'm the
only one affected by this.

Second, the following line probably doesn't do quite what you think it
does.  It's harmless (except that it masks what's really going on), but
I think it's important to understand what your code is doing.

     for (unsigned i = 0; i < dnlist->getLength (), dnode = dnlist->item
(i); i++)

I suspect your intent is to avoid evaluating "dnode = dnlist->item (i)"
if "i < dnlist->getLength ()" is not true.  What actually happens is
that both expressions are evaluated and the value of the left expression
is discarded.  Since it doesn't have any side-effects, it just wastes
CPU cycles.  You get away with it because dnlist->item() returns NULL if
i is out of range, so the whole expression evaluates to NULL/0/false
once you've traversed the list.  I'd either get rid of the left
expression (which makes the reliance on the behavior of dnlist->item()
explicit) or move the right expression inside the loop.  That is,
either:

     for (unsigned i = 0; dnode = dnlist->item (i); i++)

or:

     for (unsigned i = 0; i < dnlist->getLength (); i++)
     {
       dnode = dnlist->item (i);

I'd use the first because it is more compact and efficient.

Third, your question.  Without complete input, output, and code, it's
hard to be sure what's going on, but it looks to me like your node
replacement code is working precisely as intended.  There's no
whitespace at all in the serialization of the sup_element elements.  I
imagine you're concerned about the whitespace between the <profile> and
<system_mayank> tags, which could be introduced in the course of
serialization.  I'd expect whitespace between other tags in that case,
though, so I'm puzzled.

I'd suggest producing the simplest possible complete test case and
attaching it to a message.  If you don't find the problem in the course
of simplifying your code (which happens to me with some regularity),
you'll at least increase the odds that someone else will be willing and
able to figure it out.

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

Reply via email to