I'd like to create an RPG in JavaScript. The RPG will have a lot of dialog in it. I have heard [XML is the way to go...](https://stackoverflow.com/questions/372915/game-logic-in-xml-files), but I have no experience using XML, and a good amount of experience with PHP and MySQL. 

My questions are:

* Would it be better to store dialog in a MySQL database and access it with PHP using IDs? Or should I just keep it all on the front end by accessing XML files with Javascript?
* If I use XML, do I need to run the javascript on a webserver (Like WAMP)? Or can I parse it locally with: 

```
function parseXML() {
    xmlhttp=new window.XMLHttpRequest();
    xmlhttp.open("GET","dialog.xml",false);
    xmlhttp.send();
    xmlDoc=xmlhttp.responseXML;             
}

```

(Which is currently giving the error `XMLHttpRequest cannot load file:///C:/Users... Cross origin requests are only supported for HTTP.`

* Even after reading up on XML, I'm still not sure how I can integrate it with JavaScript. Can someone help give me an example of how I could take a sample rpg XML dialog and meaningfully parse it in JavaScript?

Thank you