Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Using XML live file from remote URL

  • 23-04-2013 4:00pm
    #1
    Registered Users, Registered Users 2 Posts: 397 ✭✭


    Hi there

    I want to try and pull an XML file from a remote website which updates the data in the file every couple of minutes. I thought it would be relatively simple to do, but have struggled to find ways of grabbing this info and laying it out into a nice HTML5 layout. Would anybody have any suggestions on how to do this. I can post up the URL to the XML file if need be.

    Thanks

    Rob


Comments

  • Registered Users, Registered Users 2 Posts: 7,501 ✭✭✭BrokenArrows


    Are you failing to grab the xml file or are you failing to display it in HTML5?

    And what language are you trying to read the xml file in?


  • Registered Users, Registered Users 2 Posts: 2,793 ✭✭✭John_Mc


    How about being a little more specific. What language/framework are you using? What code have you already written?


  • Registered Users, Registered Users 2 Posts: 397 ✭✭RobTheLad


    sorry if i was vague in the previous post, basically, I want to take data from an XML file which updates every few minutes. I want to be able to pull the data from the XML file every time the html page is loaded, so it is showing the most up to date information. The problem I am having is trying to pull the XML data from a remote URL. When I have the data pulled I am going to re-structure the info into a HTML5/JQuery mobile page, so it can be accessed on a phone or tablet device also. I have tried using PHP, but I'm not very familar with PHP, never have done it before, so is kind of confusing


  • Registered Users, Registered Users 2 Posts: 2,793 ✭✭✭John_Mc


    Are you trying to do this on the server side or client? If the former, what framework (PHP, .Net, Java etc).


  • Registered Users, Registered Users 2 Posts: 397 ✭✭RobTheLad


    John_Mc wrote: »
    Are you trying to do this on the server side or client? If the former, what framework (PHP, .Net, Java etc).

    Preferably on the client. I've tried doing it in PHP, but as I mentioned, I have very little experience with PHP, would there be a way using jQuery or Javascript to do this? The link to the XML file is

    http://www.dublincity.ie/dublintraffic/cpdata.xml


  • Advertisement
  • Closed Accounts Posts: 350 ✭✭mickgotsick


    You can use the XMLHttpRequest object to retrieve xml data in Javascript:

    http://www.w3schools.com/xml/xml_http.asp


  • Moderators, Technology & Internet Moderators Posts: 1,336 Mod ✭✭✭✭croo




  • Moderators, Society & Culture Moderators Posts: 9,689 Mod ✭✭✭✭stevenmu


    You can use Jquery Get to request the file, and then use [url="http://api.jquery.com/jQuery.parseXML/]parseXML()[/url] to process it.


Advertisement