RFML documents, called RFML source files, contain tags that define the specification for a particular data format.
Because RFML is based on PCML, the syntax is familiar to PCML users. Because RFML is an XML extension, RFML source files are easy to read and simple to create. For example, you can create an RFML source file by using a simple text editor. Also, RFML source files reveal the structure of the data in a way that is easier to understand than in a programming language like Java™.
The RFML example Using RFML compared to using IBM® Toolbox for Java Record classes includes an example RFML source file.
RFML DTD
The RFML document type definition (DTD) defines valid RFML elements and syntax. To ensure that an XML parser can validate your RFML source file at runtime, declare the RFML DTD in the source file:
<!DOCTYPE rfml SYSTEM "rfml.dtd">
The RFML DTD resides in the jt400.jar file (com/ibm/as400/data/rfml.dtd).
RFML syntax
The RFML DTD defines tags, each of which has its own attribute tags. You use the RFML tags to declare and define the following elements in your RFML source files:
In the following example, RFML syntax describes one record format and one structure:
<rfml> <recordformat> <data> </data> </recordformat> <struct> <data> </data> </struct> </rfml>