11

I've written some code to manipulate an XML document using standard W3C DOM APIs. It works well in the browser environment, and I'd like to get it to work under node.js. Unfortunately, I have not been able to find a working node.js library implementing standard W3C DOM APIs. Here are the libraries I have tried:

I could write a second implementation, using a different API, to perform the same function, but I'd rather find a library that will expose these standard interfaces, so that I can use the same code in both contexts. Is there a working node.js library that implements the W3C DOM API?

jbeard4
  • 12,664
  • 4
  • 57
  • 67
  • o3-xml worked for me on node 0.4.x. Now that I'm trying it on 0.6.8 it segfaults on parse — https://github.com/ajaxorg/node-o3-xml/issues/23 – kangax Jan 29 '12 at 00:30
  • BTW there is no win64 binary, I get Error: %1 is not a valid Win32 application: o3-win32.node – Stepan Yakovenko Sep 01 '14 at 03:59

2 Answers2

7

XMLDOM might be a good choice, it's a W3C Standard based DOMParser and XMLSerializer (DOM Level2 CORE)

good luck

user1409346
  • 71
  • 1
  • 1
4

Cloud9 uses node-o3-xml, but I have had a horrible time with it while developing on a Mac. I talked to some folks in the #nodejs IRC room and the prevaling choice seemed to be libxmljs. I've used that myself and it seems to work well, though it's not the W3C DOM API.

Bill Barnhill
  • 983
  • 11
  • 17