3 ms·
Someday, someone will implement the W3C DOM API in node so that it's possible to parse XML with the same code on both the client and server. Until then, I guess
by simonster 14y ago
Someday, someone will implement the W3C DOM API in node so that it's possible to parse XML with the same code on both the client and server. Until then, I guess I'll keep serving with xpcshell.
- grayrest 14y agoSome day was two years ago: https://github.com/tmpvar/jsdom https://github.com/tmpvar/jsdom https://github.com/andreasgal/dom.js https://github.com/andreasgal/dom.js
- simonster 14y agojsdom is great if you want to parse HTML and don't care about speed. The last time I tried it (which was <1 year ago), jsdom didn't have full support for namespaces, so it's not so great if you want to parse non-trivial XML. I haven't tried dom.js, but until recently, I don't think it would run under node at all because it needs proxies and WeakMaps. Even for HTML, jsdom is too slow to use in production, at least for our use cases. (My tests run at least one order of magnitude faster in xpcshell. I can easily download HTML faster than jsdom can parse it.)
- chrisdew 14y agohttps://github.com/tmpvar/jsdom https://github.com/tmpvar/jsdom