Monday, March 24, 2014; 5:35:42 PM Eastern
Best way to parse XML in Node.js?
- 1. I have a sizable base of code that does stuff with XML written in JavaScript that runs in the browser.
- 2. I want to run some of the code on a server, running in Node.js.
- 3. I've created a layer between jQuery and my software. I would like to use it as-is if possible, or if not, make the fewest modifications possible.
- 4. I hoped I would be able to access XML structures in the server app using jQuery or something exactly like it. Why? Well, I'm far from the first person through this space. I assume other developers want the same ability to write XML-processing code that runs in both places, without having to convert it.
- 5. So, how to do it? I've asked a couple of programming friends who are fairly expert in JavaScript and the question seems to stump them. There are of course ways to walk over XML structures, but not jQuery.
- 6. I thought then I should post this question publicly and ask for advice from readers of this blog.
- Update: For some reason I don't see people recommending this. Why? Or maybe I'm missing something?