A script-enabled browser is required for this page to function properly.

Using the XML to Forms Conversion Tool

The XML to Forms conversion tool, XML2Forms, can be invoked from the command line or from a Java program. The command can be applied to one or more XML files. You can also use the convenience scripts that are provided with the Forms installation.

The tool produces a Forms file that has the same name as the XML file, but with the appropriate extension: .fmb for a FormModule, .olb for an ObjectLibrary, and .mmb for a MenuModule. If the base file name has an _fmb, _mmb, or _olb suffix, then this is stripped from the name. The following table displays a few examples of the changes the tool makes to the name of the file being converted:

file name before conversion file name after conversion
myForm_fmb.xml myForm.fmb (assuming it was a FormModule)
myMenu_mmb.xml myMenu.mmb (assuming it was a Menu Module)
myLibrary_olb.xml myLibrary.olb (assuming it was an Object Library)
myFile.xml myFile.fmb (assuming it was a FormModule)

Note: if you modify the XML with a utility or under an operating system (such as Windows 95) that does not support the UTF-8 unicode character set, then the file will be corrupted. The XML2Forms conversion tool will produce incorrect results.

To use the XML to Forms conversion tool from the command line:

The XML2Forms command takes one or more XML files as an argument and has three parameters. The output is placed in the current folder. The command has the following syntax:

frmxml2f [options] file1 [file2...]
java oracle.forms.util.xmltools.XML2Forms [options] file1.xml [file2.xml...]

where:

Options Description
OVERWRITE=YES/NO

if OVERWRITE=YES, the tool will overwrite any Forms files with the same name that already exist in the output directory.

if OVERWRITE=NO, (default) the tool will not overwrite any Forms files with the same name that already exist in the output directory. The tool will stop processing and return the message:

File file already exists. Use argument OVERWRITE=YES to replace.

PRINTTREE=YES/NO

if PRINTTREE=YES, prints a forms object tree as the XML is parsed.

if PRINTTREE=NO, (default) no forms object tree is produced.

USERID=database_connection_string

(optional) specifies a database connection string (required if converting files with record group queries). This option uses the connection string format:

username/password@databaseName

To use the XML to Forms conversion tool in a Java program:

For example, in your program you can pass an XMLDocument object called doc to XML2Forms to convert it into a FormModule:

  ...
  XML2Forms converter = new XML2Forms(doc); 
JdapiModule newModule = converter.createModule(); ...

About Converting XML to Forms

Understanding the Generated XML

About the Convenience Scripts