Generating H+M XML

<< Click to Display Table of Contents >>

Navigation:  More Advanced Procedures > XML and XML editing >

Generating H+M XML

If you follow the rules of the Help & Manual XML Language you can also create topics, chapters and entire projects directly yourself, either manually or programmatically from your application. For example you can set up your application to generate documentation projects and topics, which you can than either edit in Help+Manual or publish directly from the command line without ever having to open Help+Manual yourself. Then you would be using Help+Manual as a compiler for your documentation.

Help+Manual XML schema documentation

The XML schema and language used in Help+Manual is fully documented in the Help & Manual XML Language Reference help file that you can find in the Help+Manual program folder. In addition to the schema and XML tag documentation, this help file also contains a tutorial explaining how to create Help+Manual projects and topic files yourself.

This tutorial provides a basic skeleton for a fully-functional Help+Manual project. You can use this as a template to create the XML with your own application. The chapter explains the most important settings that you will want to change in the XML (such as project title, language, search path) and the basic structure of project and topic files.

Creating projects and topics

The tutorial contains basic skeletons for project and topic files, which are really very simple. In this form you should be up and running within 5 minutes or so. For example, the source of a topic file is really just a few lines of code:

 <title>Welcome topic</title>
   <header><para styleclass="Heading1">Welcome topic</para></header>
   <para styleclass="Normal">Enter topic text here.</para>
   <para styleclass="Normal">Enter more topic text here.</para>

More complex topic content

Creating topics with images, links and formatted text is a bit more challenging, but it's still pretty simple. The easiest way to get the code you need is to write some sample text in a topic in Help+Manual, then switch to the XML code editor and examine the source.

When you are creating topics from scratch you will find you can omit many of the optional parameters that the XML schema defines. Try remove everything from the XML code that is extraneous to the content you want, then switch back to the WYSIWYG editor. You will notice that even a very basic XML structure will work fine.