I've built a flash movie that reads in data from an XML source. It works fine
when the XML is in a static file in the same directory either by opening the
page containing the movie through the server or just opening the html page
file.
But when I try to get the XML from an ASP page it won't work. The ASP page
works fine on its own and spits out XML identical to the static file I tested
with. I made the static file by simply saving the ASP page output.
So why won't it work live?
Saiful_Y - 28 Feb 2005 12:45 GMT
Could I have a look at the portion of your code that read the XML?
Saiful_Y - 28 Feb 2005 12:46 GMT
Could I have a look at the portion of your code that read the XML?
Wounded Paw - 28 Feb 2005 18:12 GMT
Okay here's the code but I don't think that's the problem as it works fine with
a static XML file of the same name. I'm just looking for a sample of the data
loaded at the moment to see if it's working.
import com.xfactorstudio.xml.xpath.*;
countsXML = new XPathDocument();
countsXML.onLoad = function(ok) {
// trace ("allcounts.aspx loaded");
var products = this.selectNodes("/allcounts/TBL_GUI_COUNTS[./ZONE =
'ZONE_4_E']/COUNTS/text()");
trace (products);
trans_e_c.cnt.text = products
}
countsXML.load("allcounts.aspx")
Wounded Paw - 28 Feb 2005 18:15 GMT
There is a similar topic here that suggested that maybe it's trying to read the
data before the file has actually loaded. Could that be the case here as well?
If so, how do I make sure the asp file has loaded before trying to read the
XML it contains?
Wounded Paw - 28 Feb 2005 20:45 GMT
Never mind. It turns out the asp.net page was not spitting out XML but rather a page formatted to appear like XML in the browser. I took out the formatting and it works fine.