Slight change to init & add support for xmldoc being passed in

Just a slight change to how the CommonJS module was initialized. I'm lazy and just like to new the object.

Also added the ability to send it an XMLDocument object as well as a string. Makes life easier depending on which object you might have access to at the moment.