node.jslibxml2libxml-js

What are the differences between libxmljs and libxmljs2 for node.js? How to choose?


What are the current differences or improvements of libxmljs2 vs libxmljs?
Which one to choose for a new node.js project?
libxmljs seems active again as of today, so the reason of the libxmljs2 fork seems not valid anymore...


Solution

  • Back in the day, there was a period when libxmljs wasn't getting any updates, so libxmljs2 was forked from it. It had some bugfixes (IIRC, nothing super-critical), but the main focus was to provide support for newer (at the time) Node.js versions that the unmaintained (again, at the time) libxmljs didn't support.

    Nowadays, libxmljs seems to be fairly maintained, and libxmljs2 explicitly states that it is no longer maintained.

    Funnily enough, there's also a libxmljs3 that was forked from libxmljs2, but it seems that nobody updated it in the last four years or so, and from npm's download statistics, it looks like nobody is using it.

    In short - you should probably be using libxmljs.