qad_doc2xml - Tutorial 2: Conversion of a Word document in (X)HTML

 

Preparation

Before starting qad_doc2xml, check the word document wich is going to be converted (folder "\Examples\Tutorial1", file "Recipe1.doc"). It is a word document with different paragraph styles.


Start qad_doc2xml and select the Word-Doc

Select file "Recipe1.doc" (in folder "\Examples\Tutorial1") in the "Source" section. To avoid an error message, close word before getting started with qad_doc2xml.


Name the new HTML document

...e. g. "recipe.html"


Conversion rules

Specify an HTML-tag for each paragraph-style in word.


First conversion

Click the "Convert" button. After a successfull conversion the result is shown by clicking the "View XML" (in the Browser) or "View code" (in notepad) button.


Special characters

It is possible that special characters like "é" in "Entrée", "&" or "ä" are not correctly be converted. In that case activate the "use char_conversion_table" function.


"Hard" formats - Bold, Italics

qad_doc2xml recognizes also the following "hard" formattings (italics, bold, underline, smallcaps). As this option slows down the conversion process it is deactivated by default. Using this function choose the following entries:


Attributes

Attributes can be fixed for each tag as shown (see also Tutorial 1):


Templates

XML documents usually have a detailed header wich can be added automatically, too. See the sample template-file "xhtml_template.txt". Edit the text before and after the <! - - word text --> tag (that ist the place where qad_doc2xml will place the resutls).

You can add a header using the function "Select Tmpl.", "xhtml_template.txt"


Fixing levels

For details see the XML Tutorial. Here an example for HTML:

Click the "Special" text field in the concerning line and activate the "ingnore text ..." function in the appearing dialog box.


Save conversion rules

Save the ruleset to convert similar documents.


see also XML Tutorial

<<Back to Homepage