Joey Mazzarelli

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromJoey Mazzarelli
ToMe
Subjecthttpxml requests, safari quirks
Date8 April 2005 22:38
Hello, I was recently looking for a way to make xml request in javascript
work in IE on Mac, and came across your site. Thanks for the info. A
couple things I have a couple comments.

First, the requests seem to work fine in the latest versions of Konqueror.
At least for me.

Also, I am testing this on a Mac. I don't know Mac, so the best I can do
is give you my user agent :

Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.5.7(KHTML,
like Gecko) Safari/125.12

On the Safari browser, the xml requests don't work if the xml has elements
with the same name as already established elements. For example, I am
using this to create drop down menus on the fly. My XML originally had the
expected syntax:

<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="blank.css"?>
<select>
  <option value="1">One</option>
   ...etc...
</select>

I scratched my head for awhile trying to figure out why this didnt work on
Safari, but it did everywhere else. I ultimately tried renaming my xml to
<pairs> and <pair>, and it immediately started working. I had the same
issue on another page when using the elements <image> and <link>.

I don't think I saw this mentioned on your page, and thought it might be
helpful to someone else.

Oh one last thing. I had unpredictable problems in IE on Mac, with it not
working sometimes, but working other times. It didn't seem to becoming
from the timeout being too short for the iframe thing either. The browser
would just freeze, and I'd have to kill it. I eventually ironed out that
issue by putting a comment into the blank.css stylesheet file. It did not
like that it was requesting a completely empty file. I haven't had issues
with that since that change. Weird.

Joey Mazzarelli
FromMe
ToJoey Mazzarelli
SubjectRe: httpxml requests, safari quirks
Date9 April 2005 22:47
Joey,

> First, the requests seem to work fine in the latest versions of Konqueror.
> At least for me.

excellent, I understand this is the changes to XML parsing in the 3.4
release. I hope to be able to install it soon. I have talked to users of
3.3 who said it fails. I will add a note to the site when I can.

> On the Safari browser, the xml requests don't work if the xml has elements
> with the same name as already established elements.

Indeed, safari's XML parser treats elements with the same tagName as
HTML elements as HTML. so <link> tags are treated as empty, even if they
shouldn't be. Irritating, as it ruins my RSS parser in Safari. That is
mentioned on my RSS parser page I think, but I will add a note to the
main pages as well.

I have reported this to them, but it still failed in my Safari 2
preview. Don't know if it is fixed in the latest 2.0 release.

> Oh one last thing. I had unpredictable problems in IE on Mac

why am I not surprised :) that browser just loves to crash. OK, good to
know, I will add another note to the page.

Thanks for the info.

Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
FromJoey Mazzarelli
ToMe
SubjectRe: httpxml requests, safari quirks
Date11 April 2005 17:54
Actually, I use 3.3.2. I guess that's not one of the latest versions
anymore  ;) . However, your example, with the emperor stuff, does not work.
My stuff does though (populating a drop down). So perhaps it's not the
request that is failing, but how it is being used. If you are interested
in seeing what I am doing with the XML, I can send you it when I'm at home
sometime.

I was having one more problem, and was wondering if you might have any
ideas. It is with IE on Mac. Some XML I am using has the CDATA tag in it:

<description><![CDATA[Blah blah blah blah blah.]]></description>

All browsers seem to handle this just fine, and only return the 'Blah blah
blah blah blah', but IE on Mac either has a javascript error, or returns 0
depending on how I try to get to it. I've tried to get to the contents via
.nodeValue and .data . .nodeValue causes error, and .data returns 0. If
you have any ideas, I'd really appreciate it. No need to send code, just a
point in the right direction would make me more than happy. But then
again, it's IE on Mac  ;) 

Thanks.
Joey Mazzarelli
FromMe
ToJoey Mazzarelli
SubjectRe: httpxml requests, safari quirks
Date11 April 2005 22:28
> Actually, I use 3.3.2. I guess that's not one of the latest versions
> anymore ;) . However, your example, with the emperor stuff, does not work.

weird. ok, I will investigate when I get the chance to play with newer
versions of konqueror.

> <description><![CDATA[Blah blah blah blah blah.]]></description>

sorry. never heard of IE Mac screwing this up (never heard of anyone doing
this in IE mac), but I am not surprised :)

Tarquin
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.