0 Replies Latest reply: Jan 9, 2012 11:26 PM by mjj711@126.com RSS

    In Alchemy using xml  class?



      how to call methods of XML CLASS?


      AS3_Val baClass = AS3_NSGetS(NULL, "XML");

      AS3_Trace(baClass);                           //[class XML]

      AS3_Val Params = AS3_Array("StrType","<foo><p>hello</p></foo>");

      AS3_Val ba = AS3_New(baClass, Params);

      AS3_Trace(ba);                                //<foo><p>hello</p></foo> 

      AS3_Val child = AS3_GetS(baClass, "child");

      AS3_Trace(child);                             //undefined

      AS3_Val hello  = AS3_CallT(child,ba,"StrType","p");

      AS3_Trace(hello);                             //undefined

      AS3_Val hello2  = AS3_CallTS("child",ba,"StrType","p");

      AS3_Trace(hello2);                             //undefined

      AS3_Val _xml = AS3_New(baClass, Params);

      _xml = AS3_CallS("copy",ba,no_params);

      AS3_Trace(_xml);                             //undefined


      why "undefined"?