Eclipse XML格式化程序插入不需要的换行符 [英] Eclipse XML formatter inserts unneeded line breaks

查看:152
本文介绍了Eclipse XML格式化程序插入不需要的换行符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Eclipse版本:Indigo Service Release 2

Eclipse Version: Indigo Service Release 2

我无法让我的XML格式化程序正常工作。

I can't get my XML formatter to do the job right.

当我将formatter应用到这个

When I apply formatter to this

<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>

我得到这个

<execution>

    <id>
compile
    </id>

    <phase>
compile
    </phase>

    <goals>

        <goal>
compile
        </goal>
    </goals>

</execution>

我希望格式如下:

<execution>
    <id>compile</id>
    <phase>compile</phase>
    <goals>
        <goal>compile</goal>
    </goals>
</execution>

我在 XML中尝试了不同的选项 - > XML文件 - >编辑,但似乎没有任何作用。

谢谢。

I tried different options in XML -> XML Files -> Editor but none seems to work.
Thank you.

推荐答案

问题出在Android编辑器中,这是我的默认XML编辑器。

The problem was in Android Editor, that was the default XML editor for me.

解决此问题的两个选项:

Two options to resolve this issue:


  • 使用Eclipse XML编辑器打开方式 - > XML编辑器

  • Android - >中禁用标准Android XML风格编辑者

  • Use Eclipse XML editor Open With -> XML Editor
  • Disable "Standard Android XML style" in Android -> Editors

这篇关于Eclipse XML格式化程序插入不需要的换行符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆