Converting Oracle Forms Files to XML (.fmb, .olb and .mmb)

Oracle Forms stores form modules (.fmb files), object libraries (.olb files) and menu modules (.mmb files) in binary format, and before you can perform their conversion to .NET or Java you need to convert them to XML files.

Convert using Oracle Developer Tools - Forms2XML Conversion Tool

Oracle Developer Suite 9i and Oracle Developer Suite 10g provide Forms2XML tool to convert form modules, object libraries and menu modules to XML files.

Forms2XML tool supports earlier versions of Oracle Forms, but if it cannot convert some files from an earlier version of Oracle Forms, upgrade these files to Oracle Developer Suite 9i or 10g and then convert to XML.

Forms2XML generates XML files that have the same name as the converted Forms files and adds postfix _fmb, _old or _mmb for Forms Modules, Object Library or Menu Module, respectively.

Running Forms2XML from Command Line

Forms2XML tool located in the BIN directory of Oracle Developer Suite 9i/10g. If you have previously installed the Oracle 9i/10g database, and then installed Developer Suite to the same location, you can find Forms2XML tool in the database BIN directory (for example, D:\ora92\bin)

Forms2XML is a Java program, and there is iff2xml90.bat file to run the conversion from command line.

Note. There can be also frmf2xml batch file supplied with Oracle Application Express (APEX).

For example, to convert a menu module module3.mmb, run

  iff2xml90.bat module3.mmb

As a result of the conversion, tool produces module3_mmb.xml file

You can also invoke the conversion from command line using Java as follows:

   java oracle.forms.util.xmltools.Forms2XML module3.mmb

but you have to properly set up CLASSPATH (see iff2xml90.bat how to do this). Additionally, you can write your own Java program and use Forms2XML class to do the conversion.

Example - Menu Module Conversion

Assume that we have the following menu (module3.mmb open in Menu Editor):

  • Main menu contains 2 items: File and Edit
  • File menu contains Save menu item
  • Edit menu contains Find/Replace sub-menu that contains Find and Replace menu items

Let's run the conversion:

  iff2xml90.bat module3.mmb

As a result, we receive a XML representation of the menu in module3_mmb.xml file:

<?xml version = '1.0' encoding = 'UTF-8'?>
<Module version="90040019" xmlns="http://xmlns.oracle.com/Forms">
   <MenuModule Name="MODULE3" MainMenu="MENU1">
      <Menu Name="MENU1">
         <MenuItem Name="FILE" SubMenuName="FILE_MENU" Label="File" CommandType="Menu"/>
         <MenuItem Name="EDIT" SubMenuName="EDIT_MENU" Label="Edit" CommandType="Menu"/>
      </Menu>
      <Menu Name="FILE_MENU">
         <MenuItem Name="SAVE" Label="Save"/>
      </Menu>
      <Menu Name="EDIT_MENU">
         <MenuItem Name="FINDREPLACE" SubMenuName="FINDREPLACE_MENU" Label="Find/Replace" 
         CommandType="Menu"/>
      </Menu>
      <Menu Name="FINDREPLACE_MENU">
         <MenuItem Name="FIND" Label="Find"/>
         <MenuItem Name="REPLACE" Label="Replace"/>
      </Menu>
   </MenuModule>
</Module>

Migration Resources

Discussion

, December 26, 2012 9:36 am

Hi,

which is the contents of iff2xml90.bat file?

thx

, March 20, 2013 9:33 am

it is very use full thanks for yours great job

You could leave a comment if you were logged in.