EditByFunction has Access to LibXmlJS object

Instead of the consuming function having to require libxmljs when invoked the xml doc object and the xmljs object are passed to the callee. This allows the implementor to use libxmljs functionality without having to do much else.