Safari XML parsing broken (Mac, Windows, & iPhone)

Safari (Mac, Windows, & iPhone), does not appear to properly support XML DOM parsing.
I am trying to write a javascript script to parse an XML file and display some of its contents in the HTML.
Perfect example that works for IE 6+, FF, Opera, but not Safari:
http://www.w3schools.com/dom/tryit.asp?filename=noteparsertestcrossbrowser
Here are the Safari versions I've tried:
Windows (3.0.3)
Mac (2.0.4)
iPhone (whatever version comes on first version)
I desperately need a solution/work-around.
Thank you.

safari doesn't support the xml document.load function. what about using xmlhttprequest?
http://www.w3schools.com/xml/xml_http.asp

Similar Messages

  • Compatible w/Macs; Windows; iPhone; WindowsMobile

    I have a young developer working on some web development projects for me and I'm running into compatibility issues. We test on Macs & Window systems and everything looks fine, then we go to iPhone Safari and find that our sites don't behave properly. One site does have Flash in it.
    One issue is, we don't have an iPhone and would like to know when we develop that our work is seemless throughout.
    Any suggestions as to how to make/test and assure all platforms work properly?
    (not worried too much about Windows Mobile)

    Hi Ce,
    FYI, there are some specific iPhone Forums here, you might get more help there.
    Especially here: http://discussions.apple.com/forum.jspa?forumID=1141
    AFAIK, the iPhone does not support Flash content at the moment.
    Regards
    Stefan

  • Safari XML parser converts attributes to lower case?

    I am trying to create and serialize XML documents using Safari 2.01. It appears that during this process, XML attributes are always converted to lower case. Since XML is case sensitive, this causes errors when mixed case is expected. My sample code (below) works properly (attributes not converted to lower case) in FireFox, Netscape, etc.
    Questions are:
    Is there a way to load/serizlize XML in Safari so that this does not happen?
    If not, is this behavior by design or is it a bug? Will this be changed in future versions?
    Thanks for any assistance!
    Sample code:
    // Create XML document
    var xmlString = '<Test MixedCase="test">SomeText</Test>'
    var parser = new DOMParser();
    xmlDoc = parser.parseFromString(xmlString, "text/xml");
    // Get XML text
    var serializer = new XMLSerializer();
    text = serializer.serializeToString(xmlDoc);
    IBM Thinkpad T40   Windows 2000  
    IBM Thinkpad T40   Windows 2000  
      Windows XP  
      Mac OS X (10.2.x)  
      Mac OS X (10.0.x)  

    Are you sure the parser is changing the element names?
    (You didn't really mean "attributes", did you?) If it
    is, then that's a bug in the parser. Element names in
    XML are case-sensitive, i.e. they can be upper or
    lower case or any mixture of cases. There aren't
    supposed to be any "features" that let you fiddle with
    the case of element names.
    If you told me that you were using a Transformer to
    produce HTML, and that it was outputting <TR>, I
    wouldn't be surprised. Especially since XALAN is a
    transformer and not a parser. I would just suggest in
    that case that you should change your output method
    from HTML to XML, and to output <tr>. A Transformer
    won't change the case of element names if the output
    method is XML, but it may if the output method is
    HTML.Thanks for the response. Sorry about the vernacular mixup there.
    Here is our situation:
    javax.xml.parsers.SAXParser parser = SAXParserFactory.newInstance().newSAXParser();
    parser.parse(InputSource is, HandlerBase hb) <-- noted that this is a deprecated method
    This parse method here turns the html elements upper case.
    I have experimented with setting the XMLReader on the parser as a HTMLSerializer and XHTMLSerializer with no luck in changing the outcome.
    Hope this clears things up a bit more.

  • XML Parsing broken after 1.5 Upgrade

    Hi,
    I have st upgraded to Java 1.5 and now I get the following error in my code
    Caused by: java.lang.NullPointerException
    at java.util.Hashtable.put(Unknown Source)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.setProperty(Unknown Source)
    at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:246)
    I'm using the Apache Axis library to make a Web Service client. The client doens't work in 1.5 but if I use 1.4.2 the error goes away and the client runs perfectly.
    Any ideas how I can fix this as I'd really like to use 1.5

    Hey,
    I have the similar problem however i have made the below changes
    1) Upgraded the axis to 1.4
    2) change the code which are using the key enum and recompiled using jdk 1.5
    3) in clude this jxrp-api.jar and axis.jar in the classpath
    However i still hit the same error. Do u have any idea that what else have i miss.
    Please help me

  • How to Back up iPhone to External Hard Drive on Mac/Windows

    How are you to Back up iPhone to External Hard Drive on Mac/Windows?I need to Back up iPhone to my External Hard Drive on Mac computer,Whether have you more method to help me quickly to Back up iPhone to External Hard Drive on my Mac?If you have more method to solve this question,I will thank you very much,I'm looking forward to your answer.Best wish: Merry Christmas !

    How are you to Back up iPhone to External Hard Drive on Mac/Windows?I need to Back up iPhone to my External Hard Drive on Mac computer,Whether have you more method to help me quickly to Back up iPhone to External Hard Drive on my Mac?If you have more method to solve this question,I will thank you very much,I'm looking forward to your answer.Best wish: Merry Christmas !

  • New Mac, fresh install of Mountain Lion When I click to open a .Pdf from a web page,while in Safar, I get a black window Nothing opens in Preview or in Acrobat No option to download

    New Mac, fresh install of Mountain Lion
    When I click to open a .Pdf from a web page,while in Safar, I get a black window
    Nothing opens in Preview or in Acrobat
    No option to download

    Open the Finder. From the Finder menu bar click Go > Go to Folder
    Type of copy paste the following:
    /Library/Internet Plug-Ins
    Click Go. If you see this file:  AdobePDFViewer.plugin
    Drag it to the Trash, empty the Trash.
    Quit and relaunch Safari.

  • I downloaded Safari 5.1 onto Mac OS 10.6.8 some time ago.  Yesterday the back/forward arrows next to the url window changed to a  , which adds the current url as a bookmark.  I want the arrows back.  What happened, and how can I fix this?  Thanks.  kammro

    I downloaded Safari 5.1 onto Mac OS 10.6.8 some time ago.  Yesterday the back/forward arrows next to the url window changed to a +, which adds the current url as a bookmark.  I want the arrows back.  What happened, and how can I fix this?  Thanks.  kammro

    There's another way.
    Right or control click the + then click Remove Item.
    Just remembered that keyboard shortcut!
    You're welcome 

  • Getting null value while parsing "XML String" with  encoding WINDOWS-1252.

    Hi,
    when I am converting the Follwoing "xml string " to Document, I am getting the "null" as a document value.
        String strXML =  "<?xml version="1.0" encoding="WINDOWS-1252"?>
                              <category name="SearchByAttributes" value="Search By Attributes">
                                <item name="ORDER_LINE_ID" description="Application Search Attributes" >
                                   <attribute name="Sequence" value="0001"/>
                                 </item>
                                </category>"      
    My "xml string" has the encoding vaule: WINDOWS-1252.
    I am using the following code to convert the "xml string" to Document. I am getting the Document values as a "null" while converting the above "string xml"
            String strXML = //my above string xml.
            DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
            docBuilderFactory.setIgnoringElementContentWhitespace(true);
            docBuilder = docBuilderFactory.newDocumentBuilder();
            doc = docBuilder.parse(new InputSource(new StringReader(strXML)));              
            System.out.println("doc value.."+doc)//I am getting null value for "doc".
    Can anyone help me to resolve the issue.

    Thagelapally wrote:
    I am coverting the below "XML string" to Document, once it is converted I am reading that Document,which have an "attribue" Element in.
      String strXML = "<?xml version="1.0" encoding="WINDOWS-1252"?>
    <category name="SearchByAttributes" value="Search By Attributes">
    <item name="ORDER_LINE_ID" description="Application Search Attributes" >
    <attribute name="Sequence" value="0001"/>
    </item>
    </category>" I am using the above code to read the Document. When run the code in "OC4J Server" and using Jdeveloper as an editor,I am able to perfectly read the "attribute" element in the document with out any problem.Println statement printing as I expected.
    System.out.println("Element Name..."+listOfAtt.getNodeName());
    //getting Element Name as...."attribute"(as expected)
    System.out.println("Element Attibrute list....."+elementAtt);
    //getting Element Attribute list as an...."oracle.xml.parser.v2.XMLAttrList@afe"But when run the same code(reading the same Document) in Tomcat and Eclipse,println satatement not printing as i expected.
    System.out.println("Element Name..."+listOfAtt.getNodeName());
    //getting Element Name as...."#text"(I am expecting output value "attribute" but it is printing "#text" which i don't know)
    System.out.println("Element Attibrute list....."+elementAtt);
    //getting Element Attribute list as an...."null"(I am expecting output value object reference but it is printing "null"
    (without the rest of the code, i'm guessing that) most likely you are grabbing the first child node of the item element. however, you are not accounting for some text nodes that are most likely in that list, like the whitespace between the item element and the attribute element. please go read some tutorials on xml, there are thousands of them out there, and they will answer all you initial questions much more efficiently than posting each step to the forums.

  • Spry Horizontal Menu problem in Safari Mac/Windows

    Hello! 
    Has anyone run into a problem using a horizontal spry menu and it showing up corectly in Safari?  The menu is centered but I cannot get the table to center underneath.  I then wrapped the table in a div and center aligned it, after addeding a <br/> (just trying stuff to no avail.)
    Here is a link to a site I am working on.
    http://tesibridal.com/NEW/index.html
    So far I have found it does not work in Safari 3.2.1/Mac & Safari 3.2.2 and gives me a whole new set of spacing problems in Explorer (which I will address all of those next).
    Thank you in advance for your time.
    ~TMC
    P.S. - Here is the CSS for the menu:
    @charset "UTF-8";
    /* SpryMenuBarHorizontal.css - Revision: Spry Preview Release 1.4 */
    /* Copyright (c) 2006. Adobe Systems Incorporated. All rights reserved. */
    LAYOUT INFORMATION: describes box model, positioning, z-order
    /* The outermost container of the Menu Bar, an auto width box with no margin or padding */
    ul.MenuBarHorizontal
    padding: 0;
    list-style-type: none;
    cursor: default;
    width: 55em;
    margin: auto;
    /* Set the active Menu Bar with this class, currently setting z-index to accomodate IE rendering bug: http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html */
    ul.MenuBarActive
        z-index: 1000;
    /* Menu item containers, position children relative to this container and are a fixed width */
    ul.MenuBarHorizontal li
        margin: 0;
        padding: 0;
        list-style-type: none;
        font-size: 11px;
        font-family:Verdana, Arial, Helvetica, sans-serif;
        color:#000000;
        background-color:#FF0000;
        text-align:center;
        position: relative;
        text-align: center;
        cursor: pointer;
        width: 8em;
        float: left;
    /* Submenus should appear below their parent (top: 0) with a higher z-index, but they are initially off the left side of the screen (-1000em) */
    ul.MenuBarHorizontal ul
        margin: 0;
        padding: 0;
        list-style-type: none;
        font-size: 11px;
        color:#000000;
        background-color:#FF0000;
        text-align:center;
        z-index: 1020;
        cursor: default;
        width: 10.1em;
        position: absolute;
        left: -1000em;
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to auto so it comes onto the screen below its parent menu item */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible
        left: auto;
    /* Menu item containers are same fixed width as parent */
    ul.MenuBarHorizontal ul li
        width: 10.1em;
    /* Submenus should appear slightly overlapping to the right (95%) and up (-5%) */
    ul.MenuBarHorizontal ul ul
        position: absolute;
        margin: -5% 0 0 95%;
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to 0 so it comes onto the screen */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible ul.MenuBarSubmenuVisible
        left: auto;
        top: 0;
    DESIGN INFORMATION: describes color scheme, borders, fonts
    /* Submenu containers have borders on all sides */
    ul.MenuBarHorizontal ul
        border:#000000;
        border-style:solid;
        border-width:1px;
    /* Menu items are a light gray block with padding and no text decoration */
    ul.MenuBarHorizontal a
        display: block;
        cursor: pointer;
        background-color: #FF0000;
        color: #000000;
        text-decoration: none;
        border:#000000;
        border-style:solid;
        border-width:1px;
        padding-top: 1em;
        padding-right: 0em;
        padding-bottom: 1em;
        padding-left: 0em;
    /* Menu items that have mouse over or focus have a blue background and white text */
    ul.MenuBarHorizontal a:hover, ul.MenuBarHorizontal a:focus
        background-color: #FF0000;
        color: #FFF;
    /* Menu items that are open with submenus are set to MenuBarItemHover with a blue background and white text */
    ul.MenuBarHorizontal a.MenuBarItemHover, ul.MenuBarHorizontal a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible
        background-color: #FF0000;
        color: #FFF;
    SUBMENU INDICATION: styles if there is a submenu under a given menu item
    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal a.MenuBarItemSubmenu
        background-image: url(SpryMenuBarDown.gif);
        background-repeat: no-repeat;
        background-position: 95% 50%;
    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal ul a.MenuBarItemSubmenu
        background-image: url(SpryMenuBarRight.gif);
        background-repeat: no-repeat;
        background-position: 95% 50%;
    /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal a.MenuBarItemSubmenuHover
        background-image: url(SpryMenuBarDownHover.gif);
        background-repeat: no-repeat;
        background-position: 95% 50%;
    /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal ul a.MenuBarItemSubmenuHover
        background-image: url(SpryMenuBarRightHover.gif);
        background-repeat: no-repeat;
        background-position: 95% 50%;
    BROWSER HACKS: the hacks below should not be changed unless you are an expert
    /* HACK FOR IE: to make sure the sub menus show above form controls, we underlay each submenu with an iframe */
    ul.MenuBarHorizontal iframe
        position: absolute;
        z-index: 1010;
    /* HACK FOR IE: to stabilize appearance of menu items; the slash in float is to keep IE 5.0 from parsing */
    @media screen, projection
        ul.MenuBarHorizontal li.MenuBarItemIE
            display: inline;
            f\loat: left;
            background: #FF0000;
    Message was edited by: TMCDesign
    Message was edited by: TMCDesign

    Hi clead16,
    What do you mean by "do not load properly in internet
    explorer"? I checked the site in IE6 and IE7 and it the menus
    render OK.
    You may want to also take a look at the
    Menu
    Samples and
    centering
    a horizontal menu
    on Adobe labs.
    -- Florin

  • HT5361 Been using mail forever and only with my gmail account. All of a sudden, all my inbox mails are missing except for anything after yest night. I log into gmail on safari and everything is there but not on my mac or iphone in mail

    Been using mail forever and only with my gmail account. All of a sudden, all my inbox mails are missing except for anything after yest night. I log into gmail on safari and everything is there but not on my mac or iphone in mail

    Same problem in 8.1.3
    Apple help!

  • WPA Enterprise Problem Windows 7;  Macs and iPhones working good

    Dear Apple Discussions,
    I have a strange problem within my corpoarte network. I have successfully setup airport base stations with wpa/wpa2 enterprise authentication against an open directory master on apple snow leopard server. Macs and iPhones can connect through this very easily and without problems. Windows Machines seem to have some trouble with this. I have a self signed certificate and a trusted certificate for the server, both are resulting in the same issues. The Windows clients cannot connect. There is no error message on the windows boxes. Here is a snippet from the logfile on the OSX Server radius.log:
    Thu Aug 19 12:49:45 2010 : Error: TLS Alert read:fatal:unknown CA
    Thu Aug 19 12:49:45 2010 : Error: TLS_accept:failed in SSLv3 read client certificate A
    Thu Aug 19 12:49:45 2010 : Error: rlm_eap: SSL error error:14094418:SSL routines:SSL3READBYTES:tlsv1 alert unknown ca
    Thu Aug 19 12:49:45 2010 : Error: SSL: SSL_read failed inside of TLS (-1), TLS session fails.
    This happens everytime and I did not find any possible solution within google search. Do you have any idea?
    Thank you for any help!!
    Nico

    Nico,
    I have run into this problem as well. One additional piece is that in addition to Macs and iPhones, we also have Android phones connecting with no problem.
    The only solution we came up with was to force the windows machine, in this case Vista, to use only our network and eliminate all others. Of course for our windows user that was a problem when he went home because he could not connect to his own home network any longer.
    Unfortunately, that resulted in giving up on the issue for us and forcing the windows guy to plug in via ethernet.
    -Erich

  • Slideshows which work for Mac, Windows AND ipads/iphones???

    Hi.
    My first post here & just getting into mac after many decades of windows!!
    After much searching around I have finally found a place (Yola) where I can design a website which is compatible with all browsers/mac/windows..hurray.
    However, due to the type of work that I do I need to display 50 photos (before/after). I want to do this with a slideshow. I have made up around 8 from different sites but each time there's a compatibility problem with ipads or iphones (but no problem with mac/windows/nokia smartphone).
    Is there a slideshow (FREE) which will work across all platforms? Is iphoto the only way - and will that work with windows and is there a free version.
    Finally, the website design software uses 'widgets' to place code into the site for photos/slideshows etc etc.
    Any help would really be appreciated!
    David
    PS Hope to be getting an ipad soon.

    come on guys, someone here must play some games on their intel mac?
    please help me make my mind up

  • I've just tried to open Auroara and am only getting a small window stating... XML Parsing Error: undefined entity Location: chrome://browser/content/browser.xu

    I've just tried to open Auroara and am only getting a small window stating...
    XML Parsing Error: undefined entity
    Location: chrome://browser/content/browser.xul
    Line Number 540, Column 9: <button default="true"

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do not click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Artwork Shows up on Mac, iPad, iPhone, but not Windows

    My main iTunes library resides on my home Mac. I access the library via an iPad Air, iPhone 5S, and a Dell PC running on Windows 7 Enterprise.
    All of the songs have album artwork. All of the artwork shows up on the Mac, the iPad, and the iPhone. Much of the artwork does not show up on the Windows machine. The Mac & Windows box are running the most up-to-date version of iTunes.
    I have tried enabling and disabling iTunes Match on the Windows machine. I've also completely uninstalled iTunes and removed all associated files from APPDATA, then reinstalle iTunes. No joy.
    Our organization has a policy that doesn't permit the Bonjour service to run automatically. I have to restart it every morning when I come in. It used to be that restarting the Bonjour service and restarting iTunes would cause most, but not all, of the artwork to appear. Now that trick no longer works.
    Any suggestions? Thanks!

    Hi there Kenneth Kirksey,
    I see that you are seeing some issues with the song and album artwork in iTunes Match. I have an article for you that can help you troubleshoot this issue, and it can be found below:
    Songs or albums are missing artwork
    If some songs or albums downloaded to an iOS device from your iCloud library are missing album artwork:
    Make sure you have the latest version of iTunes. You can download the latest version for free.
    Launch iTunes on your computer.
    From the iTunes menu, choose Advanced > Get Album Artwork.
    Once iTunes has completed processing the album artwork, you'll need to update iTunes Match. 
    From the iTunes menu, choose Store > Update iTunes Match.
    Once iTunes Match has finished updating, launch the Music app on your iOS device.
    Locate the songs that are missing artwork, and delete them from your device by swiping left over a song.
    After you've deleted the song, download the item again from your iCloud library by tapping on the download icon. 
    How to troubleshoot iTunes Match - Apple Support
    https://support.apple.com/en-is/HT204406
    Thanks for coming to the Apple Support Communities!
    Cheers,
    Braden

  • ICloud tabs for Safari work between Mac and iPhone 5 but not iPad 3

    All my devices are signed in with my same ID account. My Mac and Iphone 5 are communicating just fine but my iPad 3 is not receving or sending its iCloud tabs. Safari is enabled in the iCloud setting on the iPad and private browsing is not enabled on any device. Whats wrong?

    Try going to Settings>iCloud on your iPad and turning Safari Off, then back On.

Maybe you are looking for