We may have a requirement were we wanted to generate XML data to send through Httpservice or create a XML page with it.
Then here to get that XML type data we could use a little bit of ActionScript code like below.
Here iam using XML Class and XMLList Class.
First iam defining my RootNode of type XML and then node name and node value of Type String and Then create a XMLList using this node name and node value,and then append this to XML RootNode using the method appendChild().Thats it ur XML data is created, now we can extend this to generate any number of XML lines type data.
private function createXML(): void
var xm:XML = <Relyon></Relyon>;
var nodeName:String = “EMPLOYEENAME”;
var nodeValue:String = “KUMAR”;
var xmlList:XMLList = XMLList(“<“+nodeName+”>”+nodeValue+”</”+nodeName+”>”);
This will do the JOB. Leave any comments for queries.