refactor QueryXML to stop using generics.

- added test for getElements
- more documenation
- fixed minor file not found logging issue.