Text files (typically .txt) can be printed as XPS documents in any text editor launched in Windows Vista and later. You just have to select XPS Writer instead your physical printer when your print your .txt files and you will get your .xps file.
Updated: May 2, 2022