editing XML definitions and creating optional comments

General questions about using ExamDiff Pro, ideas for new features, bug reports, and usage tips.
Post Reply
completeRookie
New Member
Posts: 2
Joined: Tue May 18, 2010 8:23 am

editing XML definitions and creating optional comments

Post by completeRookie »

I use some software that generates XML files with the file extension of "xml"

I know that very early in the generated files, there are three lines that I do not care about and I'd like to ignore these lines (if present) whenever comparing.

the first line says
<Export generator="Cache" version="22" zv="Cache for Windows (x86-32) 2009.1.3 (Build 704)" ts="2010-05-18 07:14:00">
and the section in red changes all the time.

the next line
<TimeChanged>61583,39304.928852</TimeChanged>
and once again.
<TimeCreated>61192,45852.879916</TimeCreated>

so the question is, can I tell ExamDiff-pro to ignore comparing any of these lines (if present)

I've tried to be clever, and create another filetype (of xml) but of course, it complains its a pre-defined extension,
I've tried turning off the XML extension, but still no go

so the question of course, can I create any set of rules that ignores these three lines any time they occur

Your help would be appreciated.
User avatar
psguru
Site Admin
Posts: 2396
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Re: editing XML definitions and creating optional comments

Post by psguru »

You can turn off the XML plug-in (Options | Plug-ins) and ignore lines matching the following regular expression (Options | Compare):

Code: Select all

Export generator|TimeChanged|TimeCreated
Of course, this regex can be tweaked to your needs.
psguru
PrestoSoft
completeRookie
New Member
Posts: 2
Joined: Tue May 18, 2010 8:23 am

Re: editing XML definitions and creating optional comments

Post by completeRookie »

thanks for the clues where I change the options,
for those that need to do a similar job, I chose to use options - "lines matching regular expression" and inserted the following code.

Code: Select all

^<TimeChanged\b[^>]*>(.*?)</TimeChanged>|^<TimeCreated\b[^>]*>(.*?)</TimeCreated>|^<Export generator(.*?)>
worked absolutely fine, brilliant programme
Post Reply