Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Loading XML Files with Safari

Does anyone know how to load an XML file in Safari (Windows), other than XMLHttpRequest (aka Ajax)?

Is there a method similar to the (unstandardized) DOM load?

Thanks in advance.

Posted on Jul 4, 2008 10:40 AM

Reply
4 replies

Jul 5, 2008 7:51 AM in response to Reverse_Parn

I'll rephrase this. I am developing a web page that uses XML to get information. I am using JavaScript and DHTML to load the XML file, using the DOM Load, which I know is not supported by Safari. The web page works in pretty much every popular browser (IE, Firefox, Netscape, Opera), except Safari. I know one way to do this is with Ajax, which is over complicating a very simple operation. I was wondering if Safari had a built-in method to load an XML file using JavaScript? IE also does not support the DOM convention, but they have an alternative built-in method.

Thanks.

Jul 5, 2008 2:43 PM in response to Reverse_Parn

Thanks for trying to help, Pam.

It looks like the answer is that you must use Ajax to load an XML file when using Safari as there are no native methods to do so in Safari.

Msxml2.XMLHTTP is a Microsoft ActiveX object, which only works in Internet Explorer. The try... catch section in the script files fail in non-IE browsers for Msxml2.XMLHTTP and Microsoft.XMLHTTP by design) and successfully create an XMLHttpRequest(), which is, is also known as called Ajax (Asynchronous Javascript And XML.

Using Ajax for this sort of thing is causing some issues on Vista using the MS Development Server, so I'll just have to test Safari using an IIS or Apache server. I was just hoping for a simpler method.

Thanks.

Loading XML Files with Safari

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.