next up previous contents index
Next: 2.3 XML to text Up: 2. Principles of conversion Previous: 2.1 COBOL copybook analysis   Contents   Index


2.2 Text to XML conversion

This is the easiest conversion. An XML header (<?xml .... ?>) is first created. Then, one text record is read, item data is extracted from the current text record and the XML elements and their content are written one by one. The conversion process continues until the end of the text file. The XML elements can be classified in 3 categories :

All of them are built using the following rules :

If requested, TXT2XML can create a DTD (Document Type Definition), based on the COBOL copybook, which describes the XML structure. This DTD can be internal :

Figure: Internal DTD
\begin{figure}\par\par
\begin{list}{}{
\setlength{\rightmargin}{\leftmargin...
...ont\ttfamily }\item[]<NUMERIC\_TYPES>
\end{list}
...\end{list}\par
\end{figure}

or external :

Figure: XML file with an external DTD reference
\begin{figure}\par\par
\begin{list}{}{
\setlength{\rightmargin}{\leftmargin...
...ttfamily }\item[]<NUMERIC\_TYPES>
\par
...\end{list}
\end{list}\par
\end{figure}


next up previous contents index
Next: 2.3 XML to text Up: 2. Principles of conversion Previous: 2.1 COBOL copybook analysis   Contents   Index
sunuraxi@users.sourceforge.net