File comparator for .xml

We welcome any suggestions for new features or improvements in Altap Salamander. Please post one suggestion per report.
TÜV
Posts: 31
Joined: 21 Sep 2009, 14:37

File comparator for .xml

Post 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)?
therube
Posts: 681
Joined: 14 Dec 2006, 06:22

Re: File comparator for .xml

Post 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.
Last edited by therube on 05 May 2010, 19:43, edited 1 time in total.
WinXP Pro SP3 or Win7 x86 | SS 2.54
TÜV
Posts: 31
Joined: 21 Sep 2009, 14:37

Re: File comparator for .xml

Post by TÜV »

I got "The extension xml is not allowed." when trying to upload an .xml-file. So I zipped it.
Attachments
document.zip
this is from inside a .docx-file
(2.55 KiB) Downloaded 410 times
TÜV
Posts: 31
Joined: 21 Sep 2009, 14:37

Re: File comparator for .xml

Post by TÜV »

you may need the second file to compare
Attachments
document2.zip
from inside a changed .docx-file
(2.66 KiB) Downloaded 408 times
therube
Posts: 681
Joined: 14 Dec 2006, 06:22

Re: File comparator for .xml

Post 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.
Attachments
document.revised.zip
Manually revised document.xml replacing ">" with newlines. EDIT: Now with both files enclosed.
(5.37 KiB) Downloaded 416 times
branding.zip
A pair of xml's that are laid out in a readable manner, except for a few extremely long lines.
(193.95 KiB) Downloaded 396 times
WinXP Pro SP3 or Win7 x86 | SS 2.54
TÜV
Posts: 31
Joined: 21 Sep 2009, 14:37

Re: File comparator for .xml

Post 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.
Attachments
meta-xml.zip
xml without linefeeds
(801 Bytes) Downloaded 396 times
wrong display of file comparator
wrong display of file comparator
linenumber-leftovers.png (87.27 KiB) Viewed 10327 times
TÜV
Posts: 31
Joined: 21 Sep 2009, 14:37

Re: File comparator for .xml

Post 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).
Attachments
PDFXVW_De_42.7-8.zip
2 similar German Language xml-files
(66.31 KiB) Downloaded 394 times
therube
Posts: 681
Joined: 14 Dec 2006, 06:22

Re: File comparator for .xml

Post by therube »

although there are no linefeeds in it
Sure there are, $0a$ = LF.
WinXP Pro SP3 or Win7 x86 | SS 2.54
TÜV
Posts: 31
Joined: 21 Sep 2009, 14:37

Re: File comparator for .xml

Post by TÜV »

You are right. I looked at it with F4 of Salamander and there were no linefeeds to be seen.
Jan Patera
Plugin Developer
Plugin Developer
Posts: 707
Joined: 08 Dec 2005, 14:33
Location: Prague, Czech Republic
Contact:

Re: File comparator for .xml

Post 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).
Post Reply