Convert HTML or MHTML to XPS Programmatically in C#

HTML files are used over the web for presenting and formatting information. You can convert HTML files to XPS files programmatically using C#. The following use cases elaborate different conversion scenarios.
<span title='2021-07-14 13:20:00 +0000 UTC'>July 14, 2021</span>&nbsp;·&nbsp;0 min&nbsp;·&nbsp;Farhan Raza