I am writing some document comparison methods in my automation code (using Ranorex but this is not a tool specific question). I have methods for comparing the text in text files, PDF files, Excel files, Word files, etc... However, I cannot access the text in XPS (XML Paper Specification) files.
I can do a byte for byte comparison of the file but that will inevitably fail since I need to parse out any date/time stamps using regular expressions.
Anyone know of a method for extracting the text from XPS files?
Re: any experience with comparing text from XPS fi
Since XPS is based on XML, it seems like you'll need to use a tool that can parse the XML in order to extract the specific fields. Then you can compare the ones that are important to your test and ignore the others. From a quick look at the description of XPS on Wikipedia, it looks like an XPS document is actually an archive that can contain a number of different files, so your comparison may be somewhat more complex if you also need to check that embedded images are the same, etc.