xml.summary.text()[0] = "This is my summary"

Almost all e4x calls return an XMLList, including text() which returns and
XMLList where all the node types are "text."  So the above is getting the
text values/nodes and setting the first one.

- Daniel Freiman

On Thu, May 7, 2009 at 1:35 PM, lytvynyuk <lytvyn...@yahoo.com> wrote:

>
>
> I have XML instance like that:
>
> var xml:XML = <data>
>   <summary type='text'>test</summary>
>   <title type='text'>test</title >
> </data>
>
> I want to edit text in summary and title elements.
>
> I do:
>
> xml.summary = "This is my summary";
> xml.title =  "This is new title";
>
> but in resulting XML
>
> is see something like that:
>
> <data>
>   <summary type='text'>test</summary>
>   <title type='text'>test</title >
>   <summary>This is my summary</summary>
>   <title>This is new title</title >
> </data>
>
> which is a big problem for me!
>
> What's wrong here?
>  
>

Reply via email to