Remember your creating a tree:
Code:
//create a new xml object
myxml=new XML()
//create a new xml element
myxml.appendChild((new XML()).createElement("login"));
//set the attributes of this node
myxml.firstChild.attributes.username = "me";
myxml.firstChild.attributes.password = "secret";
//close the node
myxml.firstChild.appendChild(login);
//whats the output?
trace(myxml.toString())
the output window displays:
Code:
<login password="secret" username="me"></login>
Hope that helps!
[Edited by FlashGuru on 05-02-2001 at 08:41 AM]