Home > Converting an Oracle Forms ... > Step 1: Convert Oracle Form... > Converting FormModules, Obj...
Previous |
Next |
You can convert Oracle Forms FormModule, MenuModule, and ObjectLibrary files to Extensible Markup Language (XML) using the Oracle Forms to XML conversion tool, Forms2XML
.
Topics
Note: TheForms2XML utility must generate an XML file in English only. If the generated XML tags are not in English then the file will fail to load. |
The Oracle Forms to XML conversion tool, Forms2XML
was introduced in Oracle9i Oracle Developer Suite and is also available in Oracle Developer Suite 10g. This tool should also work on files from earlier releases of Oracle Forms. If the Oracle Forms to XML Conversion tool does not work for a specific file from an earlier version of Oracle Forms then that file will must be upgraded to Oracle Developer Suite 9i or 10g and then converted to XML
Forms2XML
produces an XML file that has the same base name as the Forms file with a .xml
extension. The extension _fmb
, _mmb
, or _olb
is added to the base file name to indicate whether the original file was a Forms Modules, a MenuModule, or an Object Library. 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 |
myForm _fmb.xml |
myMenu .mmb |
myMenu _mmb.xml |
myLibrary .olb |
myLibrary _olb.xml |
The Forms2XML
command takes one or more Forms Module files as an argument. The files can be FormsModule (.fmb
), ObjectLibrary (.olb
), or MenuModule (.mmb
) files. The output is placed in the current folder. The command has the following syntax:
frmf2xml [options] file1 [file2...] java oracle.forms.util.xmltools.Forms2XML [options] file1 [file2...]
Available options include:
Options | Description |
---|---|
USE_PROPERTY_IDS=YES/NO |
Setting USE_PROPERTY_IDS to YES causes the Forms to XML conversion tool to write the internal ID for Real or Character into the XML file.
The default value ( Note: The Forms2XML utility must be run with |
OVERWRITE=YES/NO |
Valid values are YES or NO .
If If If the file |
DUMP=ALL/OVERRIDEN |
If DUMP=ALL , the tool dumps all properties.
If |
You can pass the Forms2XML
tool a JdapiModule
Java object (class oracle.forms.jdapi.JdapiModule
) and dump its objects and properties to an XMLDocument
(class oracle.xml.parser.v2.XMLDocument
). For example:
... // get the modules in the session JdapiIterator mods = Jdapi.getModules(); // ... and iterate round them while(mods.hasNext()) { JdapiModule mod = (JdapiModule)mods.next(); Forms2XML converter = new Forms2XML( XMLDocument doc = converter.dumpModule(false); ... }
Note that the Boolean argument taken by the dumpModule()
method instructs converter
to dump all properties to the XMLDocument doc,
not just those which are overridden.
Once you have the module as a XMLDocument
object, you could then use the XDK classes to manipulate it. For example, you could traverse it, remove or add objects, change properties, copy objects into other modules that are also saved as XMLDocument
objects, and more—all programmatically.
To learn more about Oracle Forms, see the following hosted Help file:
http://www.oracle.com/webapps/online-help/forms/