When editing by function pass through the xmljs object so that the invoked function can have access to libxmljs functionality.