How to open an XML file

Choose "Open file..." from the File|Open menu. A file chooser appears; select the file you want to open and click "Open". Note that the XML file should be listed as "All JBuilder files" type and should have a non-default icon. If not, check the installation; perhaps Xeddy has not been installed correctly. Click here for more details about the installation.

How to create an XML file

Choose "New file..." from the File menu. A simple wizard will appear:

PLEASE NOTE
You can generate XML file using information read from DTD.

Edit the filename field if needed, choose a DTD file if you have it and select a root element from the 'root element' popup menu. This menu will be constructed from the contents of DTD file, therefore you need to specify a valid DTD, otherwise the popup menu will contain no elements and you will have to type the element name. It is also possible to generate a default XML file based on information read from a DTD. Please read related FAQ records if you have trouble using this dialog.

How to create an element or attribute

 

There are several ways to do this. The easiest way is to locate the correct piece of XML code and then type the element. The editor will parse the information and update the structure. Although this works, it is not the best way. A better way is to select a parent node of your new node (node colortable in our example), right click it and choose 'Add Subnode...". The system will display a dialog asking for the name of the new element and then insert it into the XML code. Note that the system will allow you insert any element you type (it does not check the validity using DTD) and the parser may report errors during the parse.

Use the same procedure when adding an attribute.

PLEASE NOTE
Please note, that if DTD file requires a special ordering of elements (and it usually do), editor is able to recognize it and follow this requirements while adding new elements.

If you are using a DTD file, the easiest way to insert an element is to use the Add submenu. The integrated DTD parser will keep this menu in sync with the current state of the document and DTD file, therefore it lists all files, but enables only valid ones. Using the Add menu for adding and Remove for deleting items is the easiest way of working with the editor. The image shows four items in the menu: the topmost one is the attribute "type", it is marked as "not-recommended", because the "Manifest" node probably contains one. You can add it again, but if it already exists, nothing happens. The element "Item" is next, it will add the subnode Item among Manifest's children.

Note: you can save any item (except the root) as a template. The editor will list valid templates at the end of the Add submenu (Item: 105 and its second revision in our example).

How to change an element or attribute

Editing the elements and attributes is extremely simple, just select the element in the structure view and change its value or the value of its attribute in the inspector:

PLEASE NOTE
Editing element or attribute is as simple as changing property values in your favorite visual designer tool.

 

You can see three subnodes here: r, g, and b (the color components) and one attribute "name". Click the "r" value and simply change the value. The inspector view allows you to filter the display data (explore the inspector's icons).

How to work with templates

You can save any element (except the root) as a template. Once you have done so, the system will add the saved item into an Add menu for the relevant nodes; therefore you can add saved templates to an element just by selecting its name from the Add submenu.

It is also possible to edit saved properties using a simple editor. You will find it on the Xeddy option page (choose Tools|IDE Options).

What's next

The best way to continue with Xeddy is to join the community, read more about the architecture of Xeddy and JBuilder and, maybe, compile and test any of the XML applications provided there. You may find it surprising, but there is an easy way to create custom views for your XML documents (see image) with added functionality, integrity checks and much more!