To me this is a question of intent. If our intent is to provide nice js interfaces to some of the useful bits of libxml2, then we should do these bindings. Perhaps behind a nicer API. If our intent is to make an awesome and comprehensive solution for XML in mode, then maybe we should just provide our own pure js implementation for building. Or even merge in a nice existing implementation.
One other thing to consider is that libxmljs is still one of the biggest addon modules in the node community. People use it for reference. So that's another small reason to stick to our binding roots.
Sent from my iPhone
I suspect the best thing to do would be to see if it what the API is
trying to accomplish is just as fast (or close enough) to C++ land and
if so, then keep it in JS. It makes it much easier for others who are
not familiar with the native side of things to reason about and
understand should they need to.
Also, if you can make the API more intuitive in the process, then that
might also be worthwhile. Deprecation is easy enough...just add some
printout to the old APIs and then have them call the new APIs. People
will quickly roll to the newer API.
Also, if any of this doesn't make sense or I missed the point of the
thread then just ignore me. ;D
- Nick Campbell
As an aside, I think a streaming xml generator api would be more interesting. It would basically write out as soon as it could and has determined that a particular string will no longer be changed. Maybe this api can do that; again my inexperience with the issue shines through here :)