XML:Wrench :: How-To edit and save files

Editing a file

Once you have created or opend a file you can edit it. XML:Wrench allows multiple files to be open at a time. Files are opened onto separate 'pages' and you can switch between them by clicking on the tabs along the top of the main edit panel.

If you want to, you can move a page over to the right hand side, click on the tab and then, holding the mouse down, drag the page over to the right. This can be useful if you wish to compare two documents, or just as a way of grouping several open files.

Changing file-type

File-types are really a key part of how XML:Wrench works. At any given time, XML:Wrench assumes that the file in the edit window is of a given file-type. File types include, XML, HTML, CSS, plain text and many more. (You can also add your own if you wish.)

The current file-type is used by XML:Wrench to change certain functionality. The syntax high-lighting is based on the current file-type. As is the context-sensitive help that is provided when pressing Ctrl+F1. The behaviour of the preview buttons, the new file templates, auto-close and auto-completion are all determined by the current file-type.

The current file-type is set automatically when you open a file. Ususally determined bythe file extension. However you can change this at any time. There are several reasons for doing this. You might have several file-types that all use the same extension. You might also have a file containing text of several different types. For instance, you could have some CSS or PHP code nested inside some HTML statements. This HTML might then be embedded inside some XSLT elements. Depending on what part of the file you were editing, you might want to change the current file-type between CSS,HTML and XSLT.

To change the file-type select File|Change file type... from the main menu. Then select the file-type you want to use from the drop down list.

Saving a file

Once a file has been modified you can save it. Simply select File|Save from the main menu. If it is a new file you will be prompted for a filename. You can also chhose File|Save As... to explicitly save to a different filename.

save file dialog

Saving a file to an FTP server

You can also save a file direct to an FTP server. Note that there is no facility in XML:Wrench to save direct to HTTP (a web server). In most cases, the normal method of updating a web server is via FTP. Options for saving are the same as for Opening from FTP.

save FTP file dialog