Reloading an HTML Document

You can update an existing HTML document by reloading it from an external HTML file. This replaces the document, retaining common information and removing information that does not exist in the incoming file. (For details about processing multiple HTML files, see the Schema class loadHTMLDocuments method in Chapter 1 of the JADE Encyclopaedia of Classes.)

Properties can therefore get deleted. If there are method references to deleted properties, the methods will be marked as being in error.

To reload an HTML document

  1. In the HTML Document Browser, select the HTML document that you want to reload.

  2. Select the Reload command from the HTML menu. The Reload Document dialog, shown in the following image, is then displayed.

    The name of the HTML document selected in the HTML Document Browser is displayed in the Selected Document text box. (As this is a read-only text box, you cannot change this value or select another HTML document from this dialog.)

  3. In the Reload From text box, specify the name and location of the HTML file that you want to reload into your JADE database. If you are unsure of your file directory, click the adjacent Browse button to access the Specify HTML File to Reload dialog (the common File dialog) is then displayed, to enable you to select the file and location that you require.

  4. Click the OK button. Alternatively, click the Cancel button to abandon your selections.

If your application uses the same schema but with different HTML source, you can store the HTML in another object before loading a schema and then replacing it following the schema load process.

The Schema class getHtmlDocumentSource and setHtmlDocumentSource methods enable you to get the HTML source of a document before loading a schema and then set the HTML source to the required value following the schema load process.