all groups > flash data integration > april 2006 >
You're in the

flash data integration

group:

How do I Access Data in XML Connector



How do I Access Data in XML Connector WrongSideOut
4/21/2006 8:04:47 PM
flash data integration: --------------------------------------------------------------------------------

I have an XMLConnector attached to a xml file and bound to a label. This is
working fine.

My question is:

How do I access the data values in a component or the XMLConnector through
actionscript. I can see the values in their components so I know the data
binding worked.

Whatever I try returns undefined or null for the value.

Different things I tried:

// I tried getting it directly out of the data holder - returned undefined.
var postions:Number = dh_rack.mountingPositions;

//Tried getting it out of the XML Connector.
import mx.data.binding.*;
var dataTypeObj:mx.data.binding.DataType = this.xmlConn.getField("results",
"rack.positions");
var test = dataTypeObj.getAsNumber();

var positions3 = dataTypeObj.getAnyTypedValue().value;

Any help would be appreciated.
Re: How do I Access Data in XML Connector gurthWERM
4/25/2006 5:26:30 PM
I believe you have to use the following syntax:

var positions:Number = dh_rack.data.mountingPositions

or

var positions:Number = dh_rack.data

Good luck. I never get replies for my posts except from myself.
AddThis Social Bookmark Button