While you can edit the topic content by using the visual word processor, in some cases, it can also be useful to edit the XML source code directly. For example, by using the XML Source Editor, you can quickly modify texts, formatting, associated styles, media filenames, hyperlink properties, properties of contained objects, document properties, and other settings.
Edit the XML Source Code of a Topic (or Template)
2.In the topic editing area, click the XML tab.
Remark: You can switch between the visual word processor and the XML Source Editor by clicking on the Editor and XML tabs respectively (or by pressing the F12 key).
Switching between the word processor and XML Source Editor
Editing the XML Source Code
The XML source code of a topic (or template) has a strict format, which means that you should edit the XML tags and attributes carefully and avoid XML syntax errors.
When you are switching back to the visual word processor, HelpSmith validates the XML code, and, in case, a syntax error is found (for example: an opening tag without the appropriate closing tag), the program will suggest you to continue editing the XML source code, or discard the changes to the code. This approach allows you to prevent corruption or loss of the document.
Using the Find and Replace Feature
The XML Source Editor allows you to find and replace text in the source code.
1.On the Source Editor tab, in the Editing group, click Find (or press Ctrl+F).
2.In the dialog, specify the Find What and Replace With values.
3.Use the Find Next, Replace, and Replace All buttons for the appropriate operations.
XML Code Validation
While editing the source code of a topic or template, you can check the XML code for syntax errors.
•On the Source Editor tab, in the Syntax group, click Validate XML.
Remark: If the XML code contains an error, HelpSmith will display the line number and the problematic element, so you will be able to find and correct the code in the editor.
While editing the source code of a topic or template, you can discard the changes made to the XML code.
•On the Source Editor tab, in the Editing group, click Discard Changes.
Remark: Clicking the Discard Changes button will cancel the changes and switch to the visual word processor.
Copyright © 2007-2022 HelpSmith.com