On Apr 5, 7:27 pm, Boris Zbarsky <[EMAIL PROTECTED]> wrote:
> krithika wrote:
> > // create comment as shown
> > nsAutoString str,comment,value;
> > comment.Assign(NS_LITERAL_STRING("<!-- MY COMMENT -->"));
>
> You never use this string in your code. So I'm not sure what you're doing
> with
> it exactly.
>
> > range->SelectNode(node);
>
> That's going to replace your text, but whatever.
>
> > Both InsertNode(newtext) and InsertNode(commentNode) gives me the same
> > result.
> > I get < MY COMMENT >
>
> You get that where?
>
> -Boris
Iam using comment String here.
doc->CreateTextNode(comment,getter_AddRefs(newtext));
range->InsertNode(newtext);
After doing SetNodeValue if I save the dom document to a file I find
the text < MY COMMENT > right after the text node where I tried
to insert.But I need a comment node not a string like this.
Iam new bie so I may be wrong.
regards,
Krithika
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout