adding test some test coverage and improving the helpers API to deal with XML Documents