XML:Wrench :: How-To define your own File-type

XML:Wrench comes with a number of pre-defined file-types, including XML, HTML, CSS, XSL, XSD, RSS and plain text. You may want to add your own. There are two common reasons for this. First you may wish to add a file-type to cover a standard file format that isn't supplied with XML:Wrench. Alternatively you might have your own file-type, for example an in-house XML format, that you wish to be able to create/edit using XML:Wrench.

To define a new file-type click on the 'Edit' menu and then select 'Configuration options...'. A dialog will be displayed with three separate tabbed pages; select the third page 'File-types'.

Screen-shot of Configure Dialog

Click on the Add button. You can then set most options in the same way as described earlier. There are a couple more options that you might want to setup.

Help files

You can add your own context-sensitive help file to your newly defined file-type. Create an HTML help file and add it to the folder that holds your file-type configuration. This might typically be: C:\Program Files\xmlwrench\help\newfiletype\

You then need to tell XML:Wrench the name of your help file. See: How-to configure a file-type.

ADVANCED USERS ONLY: You can create any web page you like and use it as the help file for your new file-type. However you may want to create a help file with the same general appearance as XML:Wrench's own files. You may also want to include example code that can be pasted in as with the standard help files.

To help with this, we include a sample project. This includes all our help files in XML together with style-sheets for generating the actual help files.

As a general rule, our help files have the following format. The first section describes what the file format is, and what standards if any, are covered by the help file.

This is then followed by a number of sections, each referring to a specific keyword or topic for that file format. These are usually done in order, starting with the most general or top-level topics at the beginning.

The final topic details the souce of information on the web.