开发者

Is there a simple XML editor w/ syntax highlighting?

I use Eclipse daily in a VERY limited scope, I would consider myself an Eclipse newbie. Update: I'm looking for a plugin for eclipse, not an external application (e.g. Notepad++)

Eclipse Info:

  • Version: 3.5.0
  • Build id: I20090611-1540

Installed Plugins:

  • CollabNet Merge Client 1.10.0 com.collabnet.subversion.merge.feature.feature.group
  • Eclipse SDK 3.5.0.I20090611-1540 org.eclipse.sdk.ide
  • JSEclipse 1.5.5 com.interaktonline.jseclipse.feature.group
    • Mylyn Bridge: Eclipse IDE 3.2.1.v20090722-0200-e3x org.eclipse.mylyn.ide_feature.feature.group
  • Mylyn Bridge: Team Support 3.2.1.v20090722-0200-e3x org.eclipse.mylyn.team_feature.feature.group
  • Mylyn Connector: Bugzilla 3.2.1.v20090722-0200-e3x org.eclipse.mylyn.bugzilla_feature.feature.group
  • Mylyn Task List (Required) 3.2.1.v20090722-0200-e3x org.eclipse.mylyn_feature.feature.group
  • Mylyn Task-Focused Interface (Recommended) 3.2.1.v20090722-0200-e3x org.eclipse开发者_高级运维.mylyn.context_feature.feature.group
  • NetSuite SuiteScript IDE 1.0.2 com.netsuite.ide.feature.group
  • Subclipse (Required) 1.6.4 org.tigris.subversion.subclipse.feature.group
  • Subclipse Integration for Mylyn 3.x (Optional) 3.0.0 org.tigris.subversion.subclipse.mylyn.feature.group
  • Subversion Client Adapter (Required) 1.6.4 org.tigris.subversion.clientadapter.feature.feature.group
  • Subversion JavaHL Native Library Adapter (Required) 1.6.4 org.tigris.subversion.clientadapter.javahl.feature.feature.group
  • Subversion Revision Graph 1.0.7 org.tigris.subversion.subclipse.graph.feature.feature.group
  • SVNKit Client Adapter (Not required) 1.6.4 org.tigris.subversion.clientadapter.svnkit.feature.feature.group

I use eclipse for editing javascript files. I'm not a web developer, I develop custom applications for a popular web based ERP application and they're written in javascript. I use JSEclipse (I know it's old, but I still haven't found anything better, including Aptana) with Eclipse classic.

I do sometimes need to edit xml files and even less frequently the source of html files. Currently when I open these files in Eclipse they are displayed as just basic text. No syntax coloring and the Outline window has nothing to say about the doc. I've been googling for about 20 minutes and I'm having a hard time just finding a simple plug-in that I can use with my current installation that will provide syntax hilighting. I suspect there must be one out there, but my searches are missing it somehow...

I don't want to install a different version of Eclipse, I have 3 workstations configured with my environment and don't want to stir everything up. I tried installing the "Eclipse XML Editors and Tools" from the WebTools project but it failed out with several missing dependencies.

Here are the detailed error messages:

Cannot complete the install because one or more required items could not be found. Software being installed: Eclipse XML Editors and Tools 3.2.4.v201103170600-7H7AFUaDxumQJOs8hggQZ6_jl1EOJGNlUsOsTM (org.eclipse.wst.xml_ui.feature.feature.group 3.2.4.v201103170600-7H7AFUaDxumQJOs8hggQZ6_jl1EOJGNlUsOsTM) Missing requirement: Structured Source Editor 1.2.4.v201103231819 (org.eclipse.wst.sse.ui 1.2.4.v201103231819) requires 'bundle org.eclipse.jface.text [3.6.0,4.0.0)' but it could not be found Cannot satisfy dependency:

I'm concerned about starting a "dependency chase" and before I know it I've installed a handful of things that will have who-knows-what impact on things.

Does anyone know if a simple, lightweight plugin that I can install from the "Help > Install New Software..." tool in Eclipse?


Have you consider this one? http://editorxml.sourceforge.net/

Best Regards!


The XML editor from the WebTools project is the way to go. Since you didn't post the exact problem that you encountered when trying to install this plugin, I cannot help you further. I suggest that when you encounter a problem installing a certain plugin that you post the following information:

  1. The exact details of what you have installed. Base version is a start, but you should also include which package you installed and general description of other plugins you installed into it.

  2. The exact error message you got during plugin installation.

BTW: Eclipse 3.5.0 is very old. Version 3.6.2 is out already and 3.7.0 is going to be out in a few days. At the very least, you should run search for updates and move to version 3.5.2.

Update: Based on the provided error information, it looks like you are trying to install the version of XML editor that goes with Eclipse 3.6. Make sure that you install from the following repository and disable "check other repositories" option in the install dialog.

http://download.eclipse.org/releases/galileo/


If you accept editors outside of Eclipse (I had to read the whole story to see "plugin"...), I just use SciTE, and Notepad++ should do a similar job.

For real XML editing, I found Exchanger XML Editor to be quite efficient.

Shouldn't Eclipse be able to edit XML natively? It should colorize them if they are in a project, I think. I should try...

[EDIT] Indeed, it works. But I use Eclipse Helios for Java developers, perhaps it has some goodies from a base Eclipse.
In my configuration, it opens by default XML files in outline mode. Strangely, if I open them with a text editor, I have no syntax highlighting. I have that with the Ant editor, but then it will report errors (probably checking the DTD/schema).


Free, opensource. Works with 4.5. http://www.gstaff.org/colorEditor/


LiClipse (http://brainwy.github.io/liclipse) provides a lightweight XML editor that provides syntax highlighting just fine.

-- i.e.: it's target is exactly providing lightweight editors for a many languages in Eclipse (note that it's commercial)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜