views:

289

answers:

7

Our application uses a XML configuation file. I thought that it would be nice to distribute some XML editor with our application, so that the user can conveniently edit the config file. Features should be:

  • Small and lightweight (ideally, a small .exe that does not require installation),
  • free, with license terms that permit distributing it with a commercial application,
  • understands XML schemas (auto-completion, show validation errors).

Does anyone know of such an editor?

+1  A: 

"Peters XML Editor" or "Open XML Editor" might be good choices. You have to look at the license thought. If its GPL you can bundle the Editor, even for commercial uses, because the editor will stay a standalone tool, but only if working with XML is not the main buisiness of your applicattion. Most other freeware editors are missing a license, and I would not add them without a short note from the author. Send him a mail, most freeware authors love their product being distributed.

Daniel
Thanks! Unfortunately, Open XML Editor does not support Schema validation. Peters Editor should support it, but failed to do so in my tests.
Heinzi
+2  A: 

Notepad++ (free as in beer and as in free speech) http://notepad-plus.sourceforge.net/uk/site.htm

This fulfills most of your requirements; however, it only has tag collapsing and will not show validation errors or auto completion.

XML Notepad by MSFT is good, but it does not allow wide distribution. You may be able to get by checking installed apps for XML Notepad and, if it's installed, sending startup arguments to the app.

http://www.microsoft.com/downloads/details.aspx?familyid=72d6aa49-787d-4118-ba5f-4f30fe913628&displaylang=en

Nate Noonen
Notepad++ has an XMLTools plugin that will pretty much handle all the common xml tasks including validation, checking for well-formedness, testing for XPath, Pretty printing etc.
desigeek
Wow, Notepad++ is very powerful. I'm afraid it's lack of auto completion makes it unsuitable for my purposes (and the UI is not exactly "lightweight"), but still +1, since its the best option presented so far.
Heinzi
A: 

My vote goes for Microsoft Xml Notepad 2007. It is very intuitive and your user will not have to really pay attention to the elements, but use a user-friendly interface

MilanAleksic
Microsoft + free = 1 / 0
Doodle
Thanks for the recommendation! Unfortunately, I fear that the "tree UI" is more confusing to the average user than a "text editor" interface with auto-completion.
Heinzi
I use JEdit as a text editor, but I think it is surely the perception of what a normal user is :). I witnessed many times that non-IT people start getting confused when looking at the element hierarchy and tend to make often mistakes like not closing elements, not escaping some characters etc. I agree there are better ways to deal with this, for example we use on one of our projects plain editors that map (using XSD+XSLT) into XML, so user has no idea he/she is generating XML :)
MilanAleksic
BTW, try (free) JEdit, it has a plugin for XML and "knows" how to deal with schemes - you can have you completion. I don't like Notepad++ (personal opinion).
MilanAleksic
A: 

Notepad++ with XML Tools plugin.

Reda
A: 

Notepad2

Free, lightweight (only one executable file and config.ini; not as overloaded with functions as Notepad++), versatile, nice and simple UI:

http://www.flos-freeware.ch/notepad2.html

Some One
Thanks. Unfortunately, it does not support Schema validation.
Heinzi
+1  A: 

http://sourceforge.net/projects/xml-copy-editor/

Doodle
Thanks, this looks very useful! (Unfortunately, there was not enough time to test this program before the bounty deadline.)
Heinzi
takes ages to load...
Assaf Lavie
A: 

If you cannot find what you are looking for, we wrote our own configuration editor for XML. However, it has a few restrictions that might make it not applicable to your situation.

  • It does not support XML files with more than one level of depth (ie. One root with multiple complex types but each complex type only supports simple types.)
  • Currently only supports int, double, datetime, bool and string.

Some bonuses:

  • It has auto validation from an xsd.
  • It automatically generates a user interface from the xml & xsd, so no actual XML editing.
  • Generates most applicable user interface based on simple type. (ie. DatePicker for DateTime, ComboBox for bool, and TextBoxes for the rest.
  • Ability to create new xml file, adding tables and data fields.
  • When constructing a new configuration, does validation on fields based on simple type selected.
  • When saving a new configuration, it generates the XML and XSD files.

If you are interested, it will take me a day or two to refactor it out of our current project but I can make it available. If you want the source code you can probably remove the above issues with it.

Johannes