I need to include a json file from a local directory while ajax requests did not work in some browsers (due to cross domain security issues). The final solution turned out to be quite simple, just adding a variable definition before the xml code:
var json = [ { "id":"0", ... } ]; var json = JSON.parse(json);
and including it as as the first script being loaded
<script src="js/json.js"></script>
The json var can then be processed in all other scripts.