There are at least two ways to achieve it.
- Polling. The idea is to make the browser (with Javascript) to request the server for a new version of your file every N seconds. But as you can guess, this is not absolurely "realtime" because some time may pass before you receive changes. The less N is, the faster you will receive changes, but also the more server performance will be needed.
Benefits: relatively easy to implement
Drawbacks: requires more server performance and bandwidth
How you can implement it: make sure you open (and parse - if you do it on server) the file NOT on server startup but when handling the request "Give me the XML". If you do that, you will not need to restart your server to get changes, just refresh the page in browser. Then you can program your browser page to refresh itself every N seconds in JavaScript, like this
setInterval(location.reload, N * 1000);
- Long polling. More advanced version of polling. Polling interval is quite long, like 1 minute, but polling requests are not usual, because their timeout is huge - like several minutes. Such a timeout allows server to answer the request in that time. If nothing has changed during that time, server will say that by the end of it, and the client (browser) will go on the next iteration of the long polling loop. If something has changed, the server will answer right at that moment (send changes), and the client will receive those changes immediately.
Benefits: less server performance and bandwidth are needed
Drawbacks: rather complicated to implement
See this question for more information about long polling.