Unfinished attempt at issue #19

Not yet ready to merge.

Current status:

- Partial functionality
- Some tests are broken
- Not operator seems to break due to xmldom