Add xml config

This adds XML methods to allow getting position information back in the text.