I have hard time converting Dictionary Service into XMLList. Below I included the code and the web service details. I hope someone can direct me to my mistakes.
Happy new year.
<mx:HTTPService result="handleXML(event);" fault="handleFault(event);" id="xmlRPC" resultFormat="e4x"
method="POST" contentType="application/x-www-form-urlencoded" headers="HTTP 1.1"
public var wordsList:XMLList = new XMLList();
public function handleXML(event:ResultEvent):void
wordsList = event.result.DictionaryWord as XMLList;
The above code wordsList.length() = 0, but as the screen shot shows event.result does return XML.
try doing :
wordsList = event.result as XMLList;
event.result is of type Object, so you need to cast it to XMLList or XML first before you can use xpath to access the nodes.
LaVengeance, thank you for your suggestion. I did tried it and it doesn't work either. In the end, I converted the result to an array and that work fine.