That is not working for me.  I get an error "Type Coercion failed:
cannot convert "new text node " to XML."  The text node currently has
"new text node" in it and I am just adding a space character.

What I am actually trying is more like this:
var xmlCurrent:XML = xml.node[0];
xmlCurrent = "textOne";

I'll keep trying and post my progress.

Tracy

-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Geoffrey Williams
Sent: Thursday, May 25, 2006 3:07 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: e4x XML Class: How to update a text node?

var xml:XML = <root><node>text1</node><node>text2</node></root>;
xml.node[0] = "textOne";
xml.node[1] = "textTwo";
trace (xml);

--- In flexcoders@yahoogroups.com, "Tracy Spratt" <[EMAIL PROTECTED]>
wrote:
>
> I can read, add and delete text nodes, but how can I update/modify
one?
>
> Should I use replace()?  I think I can make that work and it seems
> logical.
>
> Or delete and add?
>
> Or is there another way?
>
> Tracy
>








--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links










--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to