User Manual For XML Assistant v2.2

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
    2.3 Shortcuts
3. Editing Rules
    3.1 Open Example and Adjust Tabs
    3.2 Organize Rules
    3.3 What Rules Are
    3.4 Display Options
    3.5 XML Tree: Using Your Own Icons
4. More Hints
    4.1 Show More Content in Tree
    4.2 Also Show Elements With Content
    4.3 "Jump" to Sub Element + Multiple Selection
    4.4 Rearrange Text Fields and Tree Nodes
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.

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

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) Namespaces, attributes and elements of the tree node selected 3) View of the XML Code (if activated).

1.2 Edit and Use Rules 

Display 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 "WebPages" 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).

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

Please select 'Edit Display Rules...' from the toolbar:

The tab "Display Rules" is opened.

As the next step we move the tab 'Display Rules' to the bottom of the main window. This is done by clicking on the tab title and dragging it to icon shown at the bottom of the window.

The tab is rearranged:

Now we edit the display rules, we open the rule set "WebPages" and the rule "Web Page". On selection of "Condition: Page" or "Conditions Match" 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.

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 possibilities are available. Please take a few seconds to try them.

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 "Web Pages".

Templates are shown as buttons and in the context menu of nodes.

For creation of a new template we select "Responsible" and choose "As New Template" from its context menu.

A template is simply an own XML and are edited and saved like ordinary XML files. They are saved in the "templates" subdirectory of the User Configuration Directory (Reachable with: Extras -> "Manage Templates..." -> Klick on link below).

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

The template must also be made available to the nodes that use the template. For this, open the rule set "WebPages" and the rule "Web Page", the sub item "Templates" of "Conditions Match" defines, which templates are activated for nodes matching this rule. We add the new template.

The template will be shown in the context menu list and as a button now.

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:

The main features are:

2.2 Manage Namespaces 

Namespaces are managed similarly to attributes and content. To add a namespaces, use the menu entry 'Add Namespace' (also available in main menu 'Edit'):

Add prefix and URI in the input dialog, e.g.:

After confirmation with 'Ok' the new namespace is added:

Using the context menu of the namespace shown, you can delete and edit the namespace:

2.3 Shortcuts 

For editing in the right area you can use the following shortcuts on your keyboard:

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 "Web Pages" from the main menu.

Now choose 'Edit Display Rules...'.

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.

3.2 Organize Rules 

Rules and rule sets

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

3.3 What Rules Are 

Conditions and display options of rules

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

In this example the condition "Name is... Page" 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 described on the page for editing a condition.

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

3.4 Display Options 

Overview over the display options

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

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

3.5 XML Tree: Using Your Own Icons 

You can define your own icons for display in the XML tree.

The Help -> System Information dialog shows the directories in which icons can be stored:

System Information dialog with icon directories

The link below opens the icon directory in the user profile: C:\Users\[Username]\.xmlassistant\icons

(As soon as at least one icon is found in one of these directories, only the user-defined icons are available)

Download: File XML_Assistant_Icons.zip with all icons (370 icons)

Example: Some icons

Example with icons

Some icons are located in the directory C:\Users\[Username]\.xmlassistant\icons

These icons are now selectable:

Icons to choose from

Other icons may be defined in display rules. If no custom icon exists, the icon of the program will be displayed.

4. More Hints

4.1 Show More Content in Tree 

The tree view can show more contents for the XML Elements show, like:

4.2 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 Attributes/Children".

This will result in also these elements being listed.

4.3 "Jump" to Sub Element + Multiple Selection 

By pressing the CTRL (or ALT) 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.

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

4.4 Rearrange Text Fields and Tree Nodes 

To move content, click on it or select it, then hold down CTRL and move the mouse wheel 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.