The utility understands three types of XML files:
Note that xml2fd supports schema includes. It detects the attributes "schema=filename" or "nonamespaceschemalocation=filename" and uses the named file to determine the structure of the FDs. However, the file must be available locally. You may need to locate the schema file on the Internet, download it onto your local development machine, and then point to it before you run the XML file through the utility.
Note that xml2fd ignores attributes of XML tags, because no natural mapping exists between attributes and COBOL data items. In the following code snippet, type="personal" is an attribute that would be ignored:
<customer type="personal"> <name>Acu</name> </customer>
The xml2fd utility creates two files: a ".fd" file and a ".sl" file. The ".fd" file contains the FD and record structure for the data file. The ".sl" file contains the file type and SELECT for the data file. The base name of the files are the same as the base name of the XML file provided. For example, "mydata.xml" produces "mydata.fd" and "mydata.sl". It is your responsibility to include the output files in your COBOL program.