Home General Chat
If you need urgent support, call 999 or go to your nearest A&E. To contact our Crisis Messenger (open 24/7) text THEMIX to 85258.
Read the community guidelines before posting ✨
Aged 16-25? Share your experience of using the discussion boards and receive a £25 voucher! Take part via text-chat, video or phone. Click here to find out more and to take part.
Options

XML parsing bollox

Former MemberFormer Member Posts: 1,876,323 The Mix Honorary Guru
any idea why the following works in IE but not in firefox? getting on my nerves now :(


http://www.fr4g.com/stats/aha.html

or anyone know an easier way to parse this

http://www.game-monitor.com/xml/gsp-servers.php?gsp=8

into a table with the information,

I managed to get this done in php:

http://www.fr4g.com/stats/status.php


but am clearly clueless when it comes to XML.

any help?

Comments

  • Options
    Former MemberFormer Member Posts: 1,876,323 The Mix Honorary Guru
    on second thoughts... this whole client side parsing/formatting is all a little off. but have no idea how to format it in php.

    bah.
  • Options
    Former MemberFormer Member Posts: 1,876,323 The Mix Honorary Guru
    it's odd, im pretty confident that it's an error in my html as opposed to firefox's inability to function, i think it may just parse the invalid code differently to IE.. probably best to be parsed server-side so it's not dependant on the viewer using browser x

    maybe mist will know... *nods*
  • Options
    Former MemberFormer Member Posts: 1,876,323 The Mix Honorary Guru
    I don't know much about XML.

    My guesses, as things to try would be ...

    The HTML validator complains about a missing doctype and missng <head></head> section. It could be that these are more important to Firefox than IE.

    Doesn't XML require that you specify a namespace?

    The page does not render the data items in Opera either, so my guess is that some of the XML coding you are using may be nonstandard IE additions.

    As I say I've not used XML much, but if I take a look at it over the day I might be able to figure out how you do it. Be a matter of a suitable style sheet.
  • Options
    Former MemberFormer Member Posts: 1,876,323 The Mix Honorary Guru
    Hmm.

    I've had a look at this, and basically the solutions that I have found are -

    1. Use an XSL stylesheet to transform the XML, then load both from a page that uses the microsoft xmldom in javascript.

    2. Use an XSL stylesheet to transform the XML, then load both using some server side code.

    3. Directly edit the XML at the source to include the relevant style transforms.

    (I've included the pages for 1)

    The problems are -

    1. Only works with IE.

    2. Works with any browser, but requires an active back end such as PHP or ASP.

    3. Means that you have to be able to determine the output that you're starting with.

    Neither of these are satisfactory in my opinion, but I couldn't find what else you can do.
Sign In or Register to comment.