Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Data Integration / January 2008



Tip: Looking for answers? Try searching our database.

XML Open/Write Error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
XML Usage - 14 Jan 2008 22:18 GMT
I have an EXE and/or SWF movie that I use to display info from an XML file.  
The XML file I am using is created and written by a CSharp program every
second.  Regardless of how often I load the XML via my movie, this error
message pops up over the CSharp program, causing it to crash..."The process
cannot access the file because it is being used by another process".  I load
the XML the most common way I think possible...

XMLobs = new XML();
XMLobs.ignoreWhite = true;
XMLobs.load(XMLFILENAME);
XMLobs.onLoad = function () {
    XMLfile = new XML();
    XMLfile = XMLobs.firstChild.firstChild.nextSibling;
    XMLvars = XMLfile.childNodes;
    for (var i = 0; i < XMLvars.length; i++) {
        if (XMLvars[i].nodeName == "displayname") {
            title = XMLvars[i].firstChild.nodeValue;
        } else if (XMLvars[i].nodeName == "rawstring") {
            udp = XMLvars[i].firstChild.nodeValue;
        } else if (XMLvars[i].nodeName == "localtime") {
            wxtime = XMLvars[i].firstChild.nodeValue;
        }
    }
}

Anyone know what I'm doing wrong or is there anything I can do differently to
load the XML without crashing the CSharp program...

Thanks
GenaroRG - 15 Jan 2008 23:57 GMT
Looks like a CSharp issue with file permissions. Looks like the Csharp script
is attempting to write to the xml at the same time flash is reading and parsing
it, and this is sure to happen if both writing and reading are occurring in an
asynchronous way. Have you tried using sockets instead of xml files?  I would
recommend you take a look at the  XMLSocket class in flash.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.