Page 1 of 1

File comparator for .xml

Posted: 05 May 2010, 17:58
by TÜV
F3 in Altap Salamander 2.53 beta 1 shows the content of .xml-files in a good way (colored, using the Internet Explorer).

Alt-F3 can show the file-content with Wrap (Ctrl+W).

But the Plugin "File Comparator" shows the content of .xml-files only with line 1 (short header) and a very long line 2.

Could you improve this by adding the option Wrap (Ctrl+W) also in the File Comparator?

Could you add ">" as selectable under "Line Ends" in the options of the File Comparator (and of the Internal Viewer)?

Re: File comparator for .xml

Posted: 05 May 2010, 19:24
by therube
Can you post sample files where this occurs?
(Thinking there are enough variances between "xml" that what one may see, another may not.)

Wrap could be beneficial.

Horizontal (Ctrl+H) may help in some instances.

Re: File comparator for .xml

Posted: 05 May 2010, 19:32
by TÜV
I got "The extension xml is not allowed." when trying to upload an .xml-file. So I zipped it.

Re: File comparator for .xml

Posted: 05 May 2010, 19:37
by TÜV
you may need the second file to compare

Re: File comparator for .xml

Posted: 05 May 2010, 19:52
by therube
The "1 (short header) and a very long line 2" threw me initially.

Perhaps a layout like that is not typical?

Attached are two versions of "branding.xml" from Office 2007.

The majority of the file "works" as expected, but then there are a few ~170K character lines too (at the end of the file, & a couple shorter lines at the top).

(Comparator likely will never finish so ESC after a few seconds, choosing to run it in with Detailed Differences off.)

In this case treating ">" as end EOL character could help.

Various utilities (editors, Vim, or UNIX-like utils, sed or whatever) & you could "manually" reformat the file before comparing.

Code: Select all

%s/>/&\r/g
& your document.xml would end up like document.revised.xml.

Re: File comparator for .xml

Posted: 05 May 2010, 20:21
by TÜV
Comparing your 2 files with "Show only Differences" shows also lines with no differences.

Switching to "Horizontal View" does not refresh the whole display (leftovers of linenumbers).

Also other xml-files have no linefeeds (like your files have), see the attachment meta-xml.zip.

Re: File comparator for .xml

Posted: 05 May 2010, 21:06
by TÜV
With the 2 German language xml-files in the attached zip-file (from 2 old versions of PDF-XChange Viewer) the File Comparator plugin works fine, although there are no linefeeds in it.

But the internal file viewer of Salamander 2.53 beta 1 shows wrong German signs (ÄÖÜäöüß) and the Internet Explorer (with F3) has a problem to show the end of the older file version (42.7).

Re: File comparator for .xml

Posted: 05 May 2010, 21:23
by therube
although there are no linefeeds in it
Sure there are, $0a$ = LF.

Re: File comparator for .xml

Posted: 05 May 2010, 21:32
by TÜV
You are right. I looked at it with F4 of Salamander and there were no linefeeds to be seen.

Re: File comparator for .xml

Posted: 06 May 2010, 07:13
by Jan Patera
TÜV wrote:Comparing your 2 files with "Show only Differences" shows also lines with no differences.
Switching to "Horizontal View" does not refresh the whole display (leftovers of linenumbers).
This has been fixed for the next version of Salamander (AS 2.53b2/2.53).