Re:Rackspace makes node-elementree (JS XML API) open-source
by simonster on Wednesday May 09, 2012 @11:36AM
(#3949035)
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.
[ Parent
| on HN ]
Re:Rackspace makes node-elementree (JS XML API) open-source
by grayrest on Wednesday May 09, 2012 @11:44AM
(#3949072)
Some day was two years ago:
Re:Rackspace makes node-elementree (JS XML API) open-source
by simonster on Wednesday May 09, 2012 @01:16PM
(#3949522)
jsdom 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.)