You try what I used to solve the same kind of problem
event.result.record[0].myFieldName
where my XML looks something like this
<records>
<record>
<myFeldName>myValue</myFieldName>
</record>
</records>
Thanks to Tracy Spratt for revealing access to the
XML more directly via event.result !
Shailesh Mangal wrote:
> Hi all,
>
> Here is the xml I get back from my HTTPService call
>
> <res:message source="web" action="coveragemap" id="123"
> xmlns:res="http://response.coveragemap">
> <com:statusCode xmlns:com="common">0</com:statusCode>
> <com:statusDesc xmlns:com="common">Success</com:statusDesc>
> <res:marketValue>SanFrancisco_CA</res:marketValue>
> </res:message>
>
> but when I try to use .. operator for marketValue node, I get null
> object back. Any suggestions. I tried "use namespace" also, didnt help.
>
> HTTPService Call
> <mx:HTTPService id="xmlPoster2" url="{loc + 'coveragemap'}"
> method="POST" resultFormat="e4x" contentType="application/xml"
> result="showMap(event)"/>
>
> public function showMap(event:ResultEvent):void{
> trace(event.result);
> var res:XML = event.result..marketValue as XML;
> var imgName:String = res.toString();
> imgSrc = "assets/img/" + imgName;
> coverageMapBox.setVisible(Boolean(true));
> }
>
>