PDA

View Full Version : Flash and ASP.Net Webservice - parsing urlencoded XML and saving to an LSO


devonian rabbit
07-10-2004, 11:42 PM
I have a swf that is hitting a ASP.Net Webservice page, and getting an urlencoded xml response. because it is urlencoded, i can't simply use the webServiceConnector and databind, so i am using XML.load() to get the XML, and then I unescape it, save the unescaped XML nodes as an array, then put the data from each node into a dataSet. The code looks something like this:

function getXMLContent(src, parseFunc) {
$dXML = new XML();
$dXML.load(src);
$dXML.ignoreWhite = true;
$dXML.onLoad = parseFunc;
}
//------------------------------------
function parseEmployee(success) {
if (success) {
tData = $dXML;
xmlInfo = new Array();
this.mainNodeArray = tData.firstChild.childNodes;
xmlInfo = new XML(unescape(this.mainNodeArray));
xmlArray = xmlInfo.firstChild.firstChild.childNodes;
//place each piece of data into the dataset
xmlObject = [{propOne:xmlArray[0].firstChild, propTwo:xmlArray[1].firstChild, propThree:xmlArray[2].firstChild];
dataSet.items = xmlObject;
}
}

that works fine.. i can then trace each property of the dataSet and see what is supposed to be there. but when i try to save the data in the dataSet to an LSO, like this:

dataSet.saveToSharedObj("dataLSO", "/");

and then try to load the LSO back into the dataSet, like this:

dataSet.loadFromSharedObj("dataLSO", "/");

it comes up empty.. it isn't saving to the LSO. Anyone know why it isn't saving, or possibly a better way to go about this?

thanks,

richard