0

i am getting my objects from c# web service but i cannot use them in xml list can you please have a look at my code.

function LoadedXML(evt:ResultEvent):void {

clearALL();
loading.alpha = 0;
//trace(evt.target.data);
xmlData = new XML(evt.result);
 trace(xmlData+"\n objects are listed successfully");

var allDATAS:XMLList = xmlData.catNameServiceLibrary.attributes(); 
  // there should be problem here when accessing nodes 



for each (var datas:XML in allDATAS)
{   
    if (datas.name() == "CatName")
    {
        var tmpText:String = datas.toString();
        catName_XML.push(tmpText.substr(0,1).toLocaleUpperCase()+tmpText.substr(1,20).toLocaleLowerCase());
    }
    if (datas.name() == "Popular")
    {
        popular_XML.push(datas.toString());
    }
    if (datas.name() == "Gender")
    {
        gender_XML.push(datas.toString());
    }
}

when i trace the trace(xmlData+"\n objects are listed successfully");

i get the output

[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

How can i store my data into xmllist...

  • Is it a SOAP web service? How do you receive the data from it? If you do it via the standard "Add service reference" in VS, then it generates a proxy class for you and you receive a list of C# object, because the proxy does the XML parsing for you. – Dmytro Shevchenko Apr 12 '12 at 08:17
  • no i use that in flash compiler its a flash output... but i solved it thanks for attention... – Çağatay Yapıcı Apr 13 '12 at 08:50

0 Answers0