User manual for XML Assistant v1.1

Content:
1. Tutorial as quick introduction
    1.1 Open files
    1.2 Edit and use rules
    1.3 Templates
2. Edit XML
    2.1 Main features
    2.2 Manage namespaces
3. Editing rules
    3.1 Open example and adjust tabs
    3.2 Organize rules
    3.3 What rules are
    3.4 Display options
4. More hints
    4.1 Also show elements with content
    4.2 "Jump" to sub element + Multiple selection
    4.3 Rearrange elements in edit pane
5. Start now


1. Tutorial as quick introduction

This tutorial teaches you the main functions of the XML Assistant using concrete examples.

1.1 Open files 

Files are opened using the menu item File->Open or the icon in the toolbar.

Datei öffnen Icon Datei öffnen Menüpunkt

For this tutorial we open the example file using the predefined menu item Help->Example "Internet pages".

Beispiel öffnen

The following figure shows the file opened in the XML Assistant. The application window is divided into: 1) View of the XML file as tree of nodes 2) Attributes and elements of the tree node selected 3) View of the XML Code.

Hauptfenster

1.2 Edit and use rules 

View rules define how the data of a XML file is shown. For different types of XML files different rule sets can be created.

The rule set "Internet pages" is already selected in the list of rule sets. The rules defined there are applied to the file, they define icons and text of the tree (left) and the input fields for the element selected (right).

Datei mit Anzeigeregeln

Lets modify the rules of the rule set to better understand how it works.

Please select 'Edit rules' from the toolbar:

Regeln bearbeiten

The tab "rules.xml" is opened:

Tab Regeln bearbeiten

For a clearer view we minimize the XML code view and position the tab 'Edit rules' at the bottom.

Tab minimieren

This is done by clicking on the tab title and dragging it to the bottom forth of the main window. The mouse cursor is changing during the drag operation.

Fenster mit angeordneten Tabs Bedingungen treffen zu

Now we edit the view rules, we open the rule set "Internet pages" and the rule "Web Page". When selection "Condition: Page" or "Conditions meet" we can, for example, see that the text "Page: http://www.myspace.com (05)" may be shown for a tree node that represents the element "Page". Multiple "Page" elements are shown in the tree.

Bedingung Bedingung

Now change the input for "Node text in tree" to '$name: [Title] ([@id])'. The changes are directly applied while you are typing. The text encoded in square brackets is not simple text but expresses a XPath-Expression to be executed on this element. In this example the title is shown instead of the URL.

As you can see in the existing rule sets, many more configuration possibilies are available. Please take a few seconds to try them out.

1.3 Templates 

Templates are used to add frequently used code passages quickly. This may prevent the need for frequent copy/paste operations.

For demonstration we again use the file "Internet pages".

Beispieldatei öffnen

Doing a right click on the root node will open the context menu. In the sub menu "New" you can already see a template, that has been defined to be listed here. For creation of a new template we select "Responsible" and choose "As new template" from its context menu.

Template Als neues Template Dialog Template anlegen

A template is simply an own XML file whose content is made available over the context menu. Templates are edited and saved like ordinary XML files. They are saved in the subdirectory 'templates' of the installation.

In this example we remove all content of the template nodes, this is done by selecting the root node and the function Edit->Remove contents.

Alle Inhalte entfernen

The template must also be made available to the nodes that use the template. For this, open the rule set "Internet pages" and the rule "Web page", the sub item "Templates in context menu" of "Conditions match" defines, which templates are to be listed in the context menu for nodes matching this rule. We add the new template.

Regeln bearbeiten Template auswählen

The template will be shown in the context menu list now.

Template in Auswahlliste

2. Edit XML

Describes the main features for editing XML in XML Assistant.

2.1 Main features 

The most important edit features are accessed using the context menu (right mouse click) of the XML tree nodes or the menu Edit in the main menu:

Kontextmenü Menü

The main features are:

2.2 Manage namespaces 

Namespaces are not edited directly (by adding xmlns attributes) but using the menu item Edit->Manage namespaces. Please first select the node to edit namespaces for.

Bearbeiten->Namespaces verwalten

The next figure shows the list of namespaces for:

Liste von Namespaces

In XML it will look like this:

Namespace im Original

Using the dialog window you can add, edit and delete namespaces.

3. Editing rules

The comfort of editing XML files considerable depends on the rules being used. Using an example file this chapter will show, which view rules the XML Assistant provides.

3.1 Open example and adjust tabs 

Preparation of the example

First we open the needed tabs, to do this, choose Help>Example "Internet pages" from the main menu.

Beispiel 'Internetseiten' öffnen

Now choose 'Edit rules'.

Regeln bearbeiten...

The tab for editing the rule sets is opened. As shown below it is more comfortable to move the tab for editing rules to the bottom of the window. For this, drag the tab title with left mouse button hold down to the bottom of the main window.

Tab neu anordnen

To finish the preparation please minimize the XML code. We will not need it.

XML Code Editor minimieren

3.2 Organize rules 

Rules and rule sets

Rules are organized in rule sets. For the example file there already exists the rule set "Internet pages". Every rule set may contain multiple rules.

Regelsatz ausgewählt / Regeln des Regelsatzes

3.3 What rules are 

Conditions and display options of rules

Rules do contain one or more conditions (in most cases cases one condition is sufficient) and many display options. If all of the conditions (1) are met for a node, the display options (2) are applied.

Regel mit Bedingungen und Optionen bei Zutreffen der Bedinungen

In this example the condition "Name is... InternetPage" is sufficient. It means that if an elements in the tree has this name, the display options are applied. The other types of conditions are discribed on the page for editing a condition.

Bedingung Beispiel

If all conditions match, the display options under "Conditions match" (1) are applied. The options affect the tree (2: left) and the input panel (3: right).

Bedingungen treffen zu

3.4 Display options 

Overview over the display options

The display options are separated into different categories. These categories are:

Kategorien Darstellungsoptionen

Please take some time to make you familiar with the display options.

4. More hints

4.1 Also show elements with content 

The XML Assistant hides as much as possible of XML files. Doing this it enables you to concentrate on the contents. But in some cases you would like to also show elements with attributes or sub elements in the edit panel (right). This may be needed to e.g. change the order of the elements. To do this, please activate the option "Also show elements with content".

Option

This will result in also these elements being listed.

4.2 "Jump" to sub element + Multiple selection 

By pressing the CTRL key and moving the cursor over a field that represents an element with children the mouse cursor changes. Doing a right click will jump to this element.

Springen zu Unterelement

By clicking with the left mouse button when CTRL is down, the entry clicked is added to the selection.

4.3 Rearrange elements in edit pane 

Click on a text field and hold down the CTRL key. By moving the mouse wheel the element of this field is moved up or down.

5. Start now

This documentation covers the major functions of XML Assistant, but not all.

We hope you enjoy using our software.