Refactored GetXObject to use context, refactored regexes to share more common parts, moved XamlGenerator constants to separate file