简体   繁体   English

Beyond Compare 3.0和XML Tidy,但保存原始格式

[英]Beyond Compare 3.0 and XML Tidy, but save Original Format

I am using Beyond Compare 3.0 and using the XML tidy and XML tidied with sorted attributes plugins. 我正在使用Beyond Compare 3.0,并使用整理的XML整洁的XML和分类属性插件。 Its great and while I would like it to show me the "tidied" XML, Once I resolve me merge, I would like to save it back with the original formatting (not the tidied format). 它很棒,虽然我想向我展示“整理的” XML,但当我解决合并后,我想将其保存为原始格式(而不是整理的格式)。 Is there anyway of doing this? 反正有这样做吗?

For example, if I have these two XML snippets - 例如,如果我有这两个XML代码段-

File1 : <test attrib="1" batrib="2" catrib="3"\>
File2 : <test batrib="4" catrib="5" attrib="5"\>

I would like to visually see them tidied up and attributes sorted, so I can make my changes/resoluutions. 我希望在视觉上看到它们经过整理和属性排序,因此我可以进行更改/解决。 For example, If I resolve to change the value of attrib to 5 and keep the rest, When I save the file, I want to see this ... 例如,如果我决定将attrib的值更改为5并保留其余部分,那么当我保存文件时,我想看一下...

Final : <test attrib="5" batrib="2" catrib="3">

Not : <test 
        attrib="5" 
        batrib="2" 
        catrib="3">

Beyond compare seems to save the file in the second format (tidied) up. 超越比较似乎可以将文件保存为第二种格式(整理后)。

Any Idea how I can go about fixing this? 知道我该如何解决这个问题吗?

Regards ... 问候 ...

我能想到的最好的方法是在合并后使用Visual Studio的格式文档功能重新整理文件。

I think Pretty Diff does what you are attempting to accomplish. 我认为Pretty Diff会完成您要完成的任务。 It minifies input to remove comments and then beautifies input prior to running the diff algorithm so as to remove all differences attributed to white space and comments. 它会最小化输入以删除注释,然后在运行diff算法之前美化输入,以删除归因于空白和注释的所有差异。

http://prettydiff.com/ http://prettydiff.com/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM