Introduction to XML Editors

John New

Structured using DocBook XML, edited using XMLmind XML editor, parsed using Saxon, tidied using HTML Tidy.

Revision History
This document was created by John New, an adjunct IT lecturer at Charles Sturt University, Australia.

1. Copyright
2. Introduction
3. What To Do
3.1. Task 1: Investigate Basic Text Editors
3.2. Task 2: Investigate Graphical Text Editors
3.3. Task 3: Investigate Integrated Development Environments
3.4. Task 4: Complete XML Editor Feature Table
4. Conclusion

1. Copyright

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts and no Back-Cover Texts. A copy of the GNU FDL is available from http://www.gnu.org/licenses/fdl.html.

2. Introduction

When you create SGML or XML, you use an editor of some kind. Editors can be categorised in various ways, including:

  • basic (has few functions available)

  • complex (has many functions available)

  • free or open-source (but can still be an excellent editor)

  • commercial (and often very expensive)

  • structure-only (just shows the tag hierarchy and text)

  • graphical (provides a WYSIWYG-like view)

  • single-purpose (it's only job is to edit XML documents)

  • multi-purpose (often an Integrated Development Environment)

This document lists some well-known XML editors and provides you with links so that you can undertake your own research on the editors.

After completing this practical, you should be able to identify an XML editor that is best suited to your needs for the purposes of completing this subject and for the future.

3. What To Do

Investigate each of the XML editors listed in this document. Follow the links provided and read the information describing each editor. Note the editor(s) you would like to investigate further. Download and install the editor(s) and try them out on your own system. Use the table included in this document to record whether an editor has a certain feature or not.

If you can install the editor, use it to create an XML document, such as the following, and assess how easy or difficult it is to use. For example, try creating this document using WordPad, XMLmind XML Editor, and NetBeans.

<!-- From XML in a Nutshell, 3rd edition -->
<!-- Copyright 2004 Elliotte Rusty Harold -->
<!-- http://www.cafeconleche.org/books/xian3/examples/03/3-3.xml -->
<?xml version="1.0" standalone="no"?>
<!DOCTYPE person SYSTEM "person.dtd">
<person>
  <name>
    <first_name>Alan</first_name>
    <last_name>Turing</last_name>
  </name>
  <profession>computer scientist</profession>
  <profession>mathematician</profession>
  <profession>cryptographer</profession>
</person>

Use the editor to create the DTD associated with this document and assess how easy or difficult it is:

<!-- From XML in a Nutshell, 3rd edition -->
<!-- Copyright 2004 Elliotte Rusty Harold -->
<!-- http://www.cafeconleche.org/books/xian3/examples/03/3-1.xml -->
<!ELEMENT person     (name, profession*)>
<!ELEMENT name       (first_name, last_name)>
<!ELEMENT first_name (#PCDATA)>
<!ELEMENT last_name  (#PCDATA)>
<!ELEMENT profession (#PCDATA)>

3.1. Task 1: Investigate Basic Text Editors

Simple text editors provide the most basic facilities to create and edit XML documents. Features may include syntax highlighting and the ability to add tag libraries. These include:

  • Microsoft Notepad. Available with Windows OS.

  • Microsoft Wordpad. Available with Windows OS.

3.2. Task 2: Investigate Graphical Text Editors

Graphical editors provide additional features such as syntax highlighting, menus, drag-and-drop editing, WYSIWYG displays.

3.3. Task 3: Investigate Integrated Development Environments

IDEs provide functions such as checks for well-formedness and validity, DTD and schema editing, XSLT transformations, tag completion, management of large projects, and so on.

3.4. Task 4: Complete XML Editor Feature Table

Use the following table to record (Yes or No) whether an editor has a certain feature or not. You may need to do some research to understand what each feature means. Add more columns and rows to record additional features. The listed editors are only suggestions. If you don't want to try these editors, pick other editors.

Table 1. XML Editor Feature Table

FeatureWordpadXMLMind XML EditorNetBeansPick Other Editors
Text-view XML editing    
Grid-view XML editing    
WYSIWYG XML editing    
DTD editing    
Schema editing    
XSL / XSLT editing    
Check well-formedness    
Check validity against DTDs    
Check validity against Schemas    
XML to (X)HTML transformation    
XML to text transformation    
XML to RTF transformation    
XML to PDF transformation    
Convert DTD to XSD Schema and vice versa    
Generate XML document from DTD/XSD Schema    
Built-in DocBook XML Document DTD    
Built-in DocBook XML Website DTD    
Built-in XML Resume DTD    
Add More Features ...    

4. Conclusion

You should now be able to make an informed choice about the XML editor you want to use to complete this subject and for the future.