Re:[flexcoders] Re: dynamically create xml issue

2010-08-01 Thread j2me_soul
Thanks Alex. It worked !


At 2010-07-31 23:52:00,Alex alex.id.ciob...@gmail.com wrote:
 

Use this, for example (motice the curly braces):

function createList(nodeName:String, city:String):void{
...
...
list +=  {nodeName}  {city} / {nodeName} ;
}

Cheers,
Alex

--- In flexcoders@yahoogroups.com, j2me_soul j2me_s...@... wrote:

 I want to create a XMLList using e4x grammar like this:
 var list:XMLList = 
 Region
 city LA. /city
 city SF. /city
 ...
 /Region;
 
 function createList(nodeName:String, city:String):void{
 ...
 ...
 list +=  nodeName  city / nodeName ;
 }
 
 but the list finally is look like this:
 nodeName city /nodeName
 nodeName city /nodeName
 ...
 
 How can I create xmlList node and xmllist node content dynamically ?






[flexcoders] Re: dynamically create xml issue

2010-07-31 Thread Alex
Use this, for example (motice the curly braces):

function createList(nodeName:String, city:String):void{
 ...
 ...
 list +=  {nodeName}  {city} / {nodeName} ;
 }

Cheers,
Alex

--- In flexcoders@yahoogroups.com, j2me_soul j2me_s...@... wrote:

 I want to create a XMLList using e4x grammar like this:
 var list:XMLList  = 
 Region
city LA. /city
city SF. /city
...
 /Region;
  
 function createList(nodeName:String, city:String):void{
 ...
 ...
 list +=  nodeName  city / nodeName ;
 }
  
 but the list finally is look like this:
 nodeName city /nodeName
 nodeName city /nodeName
 ...
  
 How can I create xmlList node and xmllist node content dynamically ?





[flexcoders] Re: dynamically create xml issue

2010-07-28 Thread valdhor
Create an object with your property and use appendChild to add it to your XML. 
http://livedocs.adobe.com/flex/3/langref/XML.html

--- In flexcoders@yahoogroups.com, j2me_soul j2me_s...@... wrote:

 I want to create a XMLList using e4x grammar like this:
 var list:XMLList  = 
 Region
city LA. /city
city SF. /city
...
 /Region;
  
 function createList(nodeName:String, city:String):void{
 ...
 ...
 list +=  nodeName  city / nodeName ;
 }
  
 but the list finally is look like this:
 nodeName city /nodeName
 nodeName city /nodeName
 ...
  
 How can I create xmlList node and xmllist node content dynamically ?