In flex you can parse all xml data or no xml data.
If you want to get all data from HTTPService you can set resultFormat="text" and parse data from text. Manually fix data to be correct XML in result event handler and parse.
Then you lose the benefit of using e4x I believe. Not sure if there is an easy way around this. Maybe a try/catch? Maybe better server side validation of XML data?
Part of the prroblem is sometimes XML data returns other times data doesn't return and its the exact same data. The XML is all cleaned up
It sounds like your issue has to do with caching, check what status reports your browser when you're accessing the same data (XML file I assume) directly from browser (HttpFox is a good utility for this, on FireFox apparently).
Besides, if you generate this XML file, check if you release the locks from it (no other program is accessing it when you try to get it into SWF).
the permisions are set to minimum of 202 (read for "user" and read for "others").
the .htaccess permits accessing XML files from that location. (in case you dynamically modify it).
Also, your best way to go about such situations is to send the XML data back to the client using the server script instead of the server itself, you'll have more control over the headers you send alone with it, and less problems with permisions regulation etc. Besides, you'll be able to log any such attempt and see what you ware actually sending in response.
the xml is generated dynamically via php. So lets say the name of the file is index.php I always append a random number beside that index.php so that when passing the url its index.php?rnd=39432432432. So i am not sure if caching is the issue.
I think if you post both xml files, it'll be easier to understand what's your issue.
Double post, moderator please delete this.
Hi there, try this, rename your xml files, a rebuild the application, this works for me.
I tried that httpfox and its a really cool tool. When no data is displayed the response header has the following information
(Status-Line) HTTP/1.1 200 OK
Date Wed, 22 Apr 2009 23:26:16 GMT
Server Apache/2.0.59 (Unix) mod_ssl/2.0.59 OpenSSL/0.9.7a DAV/2 mod_fastcgi/2.4.2 PHP/4.4.4
Keep-Alive timeout=15, max=99
Hm... looks very strange =/ Meaning that your response isn't cached and it's been delivered as it should...
Could you happen to have multiple simultaneous requests been sent through that HTTPService? Generally it shouldn't happen, but if this is the case, maybe try to play with it's concurrency property (maybe setting it to "single" will help).
And... wait, why do you need that request to be Keep-Alive? cannot you just send it in one piece?
I was wondering what does concurrency do?
It means how many calls at the same time can the httpservice handle.
It still has a problem with data displaying sometimes and not always. I have attached a sample XML file to show you what result is being processed from the dynamic php file.
Thanks everybody for any help I really appreciate it.
results.xml 16.1 K
This is surya, i am new to flex.Here my quection is How can i extract data from xml file in local system to our flex application,is it possible or not.i know how to extract data from xml file placed in source folder of perticuler project.please provide me answer asap.
Thanks in advance.
The only way around this is to allow user to select a file using FileReference, upload file to server, and then load the data. Flex apps can't access local hard drive. AIR apps built in Flex can.