Added support for specifying contexts for xml strings