linux下的xml编辑器

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11207516/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-06 07:04:05  来源:igfitidea点击:

xml editor for linux

xmllinuxubuntuxml-visualizer

提问by Ragini

I want to view large XML files. I tried XML Copy Editorbut it displays XML data just in one line means it is not showing it in proper format. I saw screenshots of XML Copy Editor on Google which look quite good.

我想查看大型 XML 文件。我尝试了XML Copy Editor,但它只在一行中显示 XML 数据,这意味着它没有以正确的格式显示。我在 Google 上看到了 XML Copy Editor 的截图,看起来很不错。

Does anybody have an idea how do I view XML file in XML Copy Editor in proper format?

有人知道如何以正确的格式在 XML Copy Editor 中查看 XML 文件吗?

Or any other good XML viewer for Ubuntu?

或者任何其他适用于 Ubuntu 的优秀 XML 查看器?

回答by kokosing

If you like to use command line interface, you woud like to use xmllinttool to proper format xml file, and then you can use regular lessto view this large xml file.

如果你喜欢使用命令行界面,你会喜欢使用xmllint工具来正确格式化 xml 文件,然后你可以使用常规的less来查看这个大的 xml 文件。

回答by minopret

People at XML editing in Linuxlike the $400 program oxygenXML. People at http://alternativeto.net/SearchResult.aspx?search=tag:xml-editorlike Geany. Sorry I don't know the answer to your difficulty with XML Copy Editor.

在 Linux 中进行XML 编辑的人喜欢 400 美元的oxygenXML 程序。人http://alternativeto.net/SearchResult.aspx?search=tag:xml-editor喜欢Geany。抱歉,我不知道您使用 XML Copy Editor 遇到的困难的答案。

回答by dj_segfault

My favorite editor, which happens to handle XML very well, is jEdit. jEdit has an amazing number of features that make it good for lots of uses, as well as being cross-platform so I can use the same editor on all computers.

我最喜欢的编辑器是jEdit,它恰好可以很好地处理 XML 。jEdit 具有数量惊人的功能,使其适用于多种用途,并且是跨平台的,因此我可以在所有计算机上使用相同的编辑器。

jEdit has several XML plugins to do validation, searches, transformations, etc.

jEdit 有几个 XML 插件来进行验证、搜索、转换等。

回答by Hrishi

Check Conglomerate, it aims to be an XML editor that everyone can use.

检查Conglomerate,它旨在成为每个人都可以使用的 XML 编辑器。

回答by Cloud

Real programmers use VIM...

真正的程序员使用VIM...

http://xkcd.com/378/

http://xkcd.com/378/

enter image description here

在此处输入图片说明





Others have used it successfully for this purpose: http://www.pinkjuice.com/howto/vimxml/

其他人已成功地将其用于此目的:http: //www.pinkjuice.com/howto/vimxml/

回答by Tero Niemi

None of you guys suggesting Emacs, Vim, Geany or other text editor have clearly not worked with enterprise level XML data...

你们中没有人建议 Emacs、Vim、Geany 或其他文本编辑器显然不能处理企业级 XML 数据......

To get a touch with reality please take some averagely complex OpenDocument (Open/Libre Office ".odt" file, preferably with some tables and images) and try to edit that with your Emacs or Vim. Try to create a new with all the required fields pre-filled. Create a new table, or insert a new image. With a good XML editor all you need is "Right click -> Insert".

要了解现实,请使用一些一般复杂的 OpenDocument(Open/Libre Office“.odt”文件,最好带有一些表格和图像)并尝试使用 Emacs 或 Vim 对其进行编辑。尝试创建一个预先填写所有必填字段的新字段。创建一个新表,或插入一个新图像。有了一个好的 XML 编辑器,您只需要“右键单击 -> 插入”即可。

Unfortunately good XML editors cost money. XMLSpy from Altova is about 1000 U.S. dollars, OxygenXML bit less.

不幸的是,好的 XML 编辑器要花钱。Altova 的 XMLSpy 大约 1000 美元,OxygenXML 少一点。

回答by Todd

Does anbody have idea how do I view xml file iin xml copy editor in proper format ?

有人知道如何以正确的格式在 xml 复制编辑器中查看 xml 文件吗?

XML > Pretty-print (F11)

You can also "Open Large Document..." from the File menu

您还可以从“文件”菜单中“打开大文档...”

回答by Jo?o Pimentel Ferreira

Old question, but Notepadqqis very good for XML tree viewing. This is a "brother" of the famous notepad++ for Windows.

老问题,但Notepadqq非常适合查看 XML 树。这是著名的 Windows 版记事本++的“兄弟”。

回答by fralau

Combining xmllintand lesswas a great intuition (kudos for @kokosing) and yes, it is possible to have syntax highlighting with less!Here is the full, workable solution:

结合xmllintless是一个很好的直觉(@kokosing 的荣誉),是的,可以用 less 突出显示语法!这是完整的,可行的解决方案:

xmllint --format yourfile | highlight --syntax=xml --out-format=xterm256 | less -R -N

The trick is to use:

诀窍是使用:

  1. Another utility to do the syntax hightlighting (highlight can do it).
  2. Use the -R(raw) option in less so that it respects the escape sequences; Nsimply provides line numbering, which is nice.
  1. 另一个用于进行语法高亮显示的实用程序(highlight 可以做到)。
  2. -R在 less 中使用(raw) 选项,以便它尊重转义序列;N简单地提供行编号,这很好。

It worked surprisingly well, so I published the solution on githubwith a bash script, under the name xmlshow.

它运行得非常好,所以我在 github发布了一个带有 bash 脚本的解决方案,名称为xmlshow

Note:Next time you use less, I suggest that you press hto (re-)discover its amazing range of features.

注意:下次您使用较少时,我建议您按h(重新)发现其惊人的功能范围。

回答by frederickjh

Checkout QXmlEditand CAM XML Editorboth are open source and available for Linux and have good ratings on sourceforge.net. These XML editors were found in the Wikipedia Comparison of XML editors

Checkout QXmlEditCAM XML Editor都是开源的,可用于 Linux,并且在sourceforge.net上有很好的评价。这些 XML 编辑器可以在维基百科XML 编辑器比较中找到