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
xml editor for linux
提问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
回答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...
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
回答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:
结合xmllint和less是一个很好的直觉(@kokosing 的荣誉),是的,可以用 less 突出显示语法!这是完整的,可行的解决方案:
xmllint --format yourfile | highlight --syntax=xml --out-format=xterm256 | less -R -N
The trick is to use:
诀窍是使用:
- Another utility to do the syntax hightlighting (highlight can do it).
- Use the
-R
(raw) option in less so that it respects the escape sequences;N
simply provides line numbering, which is nice.
- 另一个用于进行语法高亮显示的实用程序(highlight 可以做到)。
-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 h
to (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 QXmlEdit和CAM XML Editor都是开源的,可用于 Linux,并且在sourceforge.net上有很好的评价。这些 XML 编辑器可以在维基百科XML 编辑器比较中找到