Update XMLTools.js

Update text to textContent
Add null check for doc when getting toObject
Update XMLTools.js

Make Android happier
Update XMLTools.js

Add licensing header
Merge pull request #3 from benbahrenburg/master

A few small updates