Possible approaches:
- Browserify JSDOM and use that, although this would theoretically work the generated file is over 29000 lines long... which seems to be unacceptably big even for modern mobile devices or even desktops
- Do it all whilst the user is using the app in the same thread: slow and makes the app occasionally hang
- Pre-parse the XML files to JSON and insert those. Seemed to be one of the best solutions, however as I also need the pure XML files in the app itself it would mean passing all the data twice effectively doubling the size of the application.