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

发布于 2024-07-26 02:56:54 字数 646 浏览 2 评论 0原文

我正在使用 Beyond Compare 3.0 并使用 XML tidy 和带有排序属性的 XML tidied 插件。 它很棒,虽然我希望它向我显示“整理的”XML,但一旦我解决了合并问题,我想用原始格式(而不是整理的格式)将其保存回来。 有办法这样做吗?

例如,如果我有这两个 XML 片段 -

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

我希望直观地看到它们整理完毕并排序属性,以便我可以做出更改/解决方案。 例如,如果我决定将 attrib 的值更改为 5 并保留其余部分,当我保存文件时,我想看到这个...

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

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

Beyond Compare 似乎以第二种格式(整理)保存文件。

知道如何解决这个问题吗?

问候 ...

I am using Beyond Compare 3.0 and using the XML tidy and XML tidied with sorted attributes plugins. 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). Is there anyway of doing this?

For example, if I have these two XML snippets -

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 ...

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 ...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

不醒的梦 2024-08-02 02:56:54

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

The best way I can think of is to use Visual Studio's format document feature to re-un-tidy the file after you've merged.

心的位置 2024-08-02 02:56:54

我认为 Pretty Diff 做了你想要完成的事情。 它会缩小输入以删除注释,然后在运行 diff 算法之前美化输入,以删除归因于空格和注释的所有差异。

http://prettydiff.com/

I think Pretty Diff does what you are attempting to accomplish. 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.

http://prettydiff.com/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文