change/set E4X text-node text
hello all,
trying change/set text-value of as3 e4x text node (nodekind == 'text': true).
assuming 'textnode' valid e4x text node, folks on web have offered solution...
textnode.parent().children()[textnode.childindex()] = "newtextvalue";
(or broken multiple statements):
var p : xml = textnode.parent();
var childindex : int = textnode.childindex();
p.children()[childindex] = "newtextvalue";
unfortunately, removes 'textnode' parent, replacing new text-node "newtextvalue" text (inserting new-text-node textnode was).
this not behavior i'm looking for. want explicitly set text value of 'textnode'.
is there way this? if not, why not? old xmlnode allowed via .nodevalue property.
thanks mucho help.
trying change/set text-value of as3 e4x text node (nodekind == 'text': true).
assuming 'textnode' valid e4x text node, folks on web have offered solution...
textnode.parent().children()[textnode.childindex()] = "newtextvalue";
(or broken multiple statements):
var p : xml = textnode.parent();
var childindex : int = textnode.childindex();
p.children()[childindex] = "newtextvalue";
unfortunately, removes 'textnode' parent, replacing new text-node "newtextvalue" text (inserting new-text-node textnode was).
this not behavior i'm looking for. want explicitly set text value of 'textnode'.
is there way this? if not, why not? old xmlnode allowed via .nodevalue property.
thanks mucho help.
i not following. if set value of text node, replaces previous text node.
what seeing difference between setting nodevalue , assigning string text node?
i haven't analyzed this, can definitively there no difference, what, functionally speaking, trying achieve?
tracy
what seeing difference between setting nodevalue , assigning string text node?
i haven't analyzed this, can definitively there no difference, what, functionally speaking, trying achieve?
tracy
More discussions in Flex (Read Only)
adobe
Comments
Post a Comment