PDA

View Full Version : XML woes


CookieDoh
05-03-2005, 12:06 AM
I have an SWF that loads an XML file. It works fine on my computer but it won't work on the server. The XML and SWF are in the same directory. It works fine in Internet Explorer, not in mozilla and not on Mac via Safari. The problem is even there when I access the SWF direct blahblah.com/xmltest.swf(no html embed/object)

Tried a few different servers, windows 2003 and fedora (linux). Any guesses:confused:

hangalot
05-03-2005, 11:56 AM
set the content type in the xml

CookieDoh
05-03-2005, 04:15 PM
Forgive my ignorance :) , How do I set the content-type in the XML file? I tried testXML.contentType="application/xml"; from flash, but no luck. I did notice that if I opened the XML file direct in the browser it cached and then the SWF would load fine.

hangalot
05-03-2005, 04:39 PM
no, set it in the xml file. google it. also make certain that the encoding is an encoding that your computer supports (most support utf-8).

CookieDoh
05-03-2005, 11:26 PM
I've tried several combinations, no luck. Here is my code, is this what you meant by content type or did you mean the headers/mime types?


<?xml version="1.0" encoding="UTF-8"?>
<test type="text/xml">
<testInt designator="Lesson 4" quizCount="1">
<question type="userType" questionContent="Red is a ________" graphic="no">
<correct correctAnswer="color" correctAnswer2="COLOR" cText="Red is a color!"/>
<wrong wrongAnswer="Red is a color!"/>
</question>
</testInt>
</test>

CookieDoh
05-05-2005, 04:04 AM
ya, I noticed that I used the type keyword for my code, didnt seem to make a diff. I ended up editing the mime.types file for apache and removed the .xml extension from the table which works. Not the correct way, I know. but it'll do for now.

thanks.