Chapter 1. Introduction

Table of Contents

1. What you'll learn
2. Best practices
3. Compiling and running the code samples

1. What you'll learn

If you have taken the time to read:

you know that XMLmind XML Editor (XXE for short) can be customized/extended substantially without having to write a single line of code. However there are some cases where programming against the Java™ API of XXE becomes inevitable.

This guide is divided into three parts:

Part I, “Extending XMLmind XML Editor”

This part covers all the extension points of XXE, from writing advanced configurations to extending the GUI of XXE.

Prerequisite: please first read Chapter 2, Writing a configuration file for XXE in XMLmind XML Editor - Configuration and Deployment and if you want to extend the GUI of XXE, please also read Chapter 2, Tutorial in XMLmind XML Editor - Customizing the User Interface.

Part II, “Embedding an advanced XML editor based on XXE in your Java™ application”

This part explains how to embed an advanced XML editor based on XXE in your Java™ application (CMS front-end, specialized IDE, etc).

Prerequisite: please first read Chapter 2, Tutorial in XMLmind XML Editor - Customizing the User Interface.

Part III, “A lightweight XML Editor based on XXE components”

This part describes how to write a lightweight XML editor based on XXE components. We do not recommend to follow this path as it requires too much work to obtain a really usable XML editor. However, if you are a curious programmer, you may want to read this part of the guide.

2. Best practices

  • Rather than copying and modifying the code samples which come with this document, we recommend instead using our project creation wizard. This wizard makes it easy creating Ant and/or Eclipse projects.

    Figure 1.1. The Create Project wizard

    The Create Project wizard

    On Windows, this wizard is started by executing the following command:

    C:\Program Files\XMLmind_XML_Editor\doc\dev\createproject> javaw -jar createproject.jar

    Double-clicking on createproject.jar should work too. On Linux and on the Mac, open a terminal and execute the following command:

    /opt/xxe/doc/dev/createproject$ java -jar createproject.jar &

    Java™ archive createproject.jar is found in subdirectory createproject/ of the directory containing this guide.

  • Error messages related to loading and invoking extension code are all printed on stderr. Therefore when you develop extension code on Windows, it is strongly recommended to run XXE using java rather than using javaw. In order to do this, simply start XXE using XXE_install_dir/bin/xxe-c.bat rather than using xxe.exe.

  • Important! Do not forget to disable the quick start cache in XMLmind XML Editor - Online Help of XXE when you are developing and testing your code.

  • Always keep in mind that XXE code is not thread-safe. Most of it is not even reentrant.

  • Please remember that the full-source code of XXE is available at no cost starting from 10 user licences. Do not hesitate to download this source code when you need more examples than those used in this document.

3. Compiling and running the code samples

All the code samples used to illustrate this document are found in the samples/ subdirectory.

Ant, a Java-based build tool (in theory, it is kind of like make, without make's wrinkles say its authors), is needed to build and run these code samples.

build_all.xml, the ant build file needed to compile and run code samples, has been tested against ant version 1.8+.