Creating Record parts from JSON, XML, and XML Schema

You can use a Workbench facility to create Record parts from JSON, XML, or XML Schema content that is provided in any of three ways: from a Web address, from a file, or from text that you provide directly. Alternatively, you can create a single Record part for general use, without retrieving input.

To create the Record part or parts:
  1. Access the New EGL Record in one of two ways:
    • From the menu bar, click File > New > Record; or
    • Right-click a project, source folder, package, or file and click New > Record.
  2. On the New EGL Record page, specify an existing source folder, along with a package and a new source file. The package will be created if it does not already exist.
  3. Click Next. The Template page is displayed.
  4. Select one of the following options:
    Basic
    To insert a basic Record part for you to customize.
    Records from JSON
    To insert a set of Record parts that correspond to the fields in a JSON string. As necessary, property settings in the Record parts will handle naming issues such as EGL reserved words in the JSON string.
    Records from XML
    To insert a set of Record parts that correspond to the elements in an XML string. As necessary, property settings in the Record parts will handle naming and namespace issues.
    Record from XML Schema
    To insert a set of Record parts and data items that correspond to the elements described in an XML Schema. As necessary, property settings in the Record parts will handle naming and namespace issues.
  5. If you selected Basic, complete the task by clicking Finish. Otherwise, click Next to display another page.
  6. Select the source of the JSON string, XML string, or XML Schema:
    • If you select Create from a URL, specify a Web address that returns the appropriate kind of input.
    • If you select Create from a file, identify a file that includes only the appropriate kind of input. You can type the fully qualified file name or use the Browse mechanism.
    • If you select Create from a string, type or paste a string into the text box.
  7. To review the created Record parts before writing them to the source file, click Next. You cannot update the content, but can click Back to return to the previous screen, where you can re-select the input.
  8. To write the created Record parts to the source file, click Finish.