Creating and Customizing XML Type Definitions in NI Requirements Gateway

Updated Aug 21, 2025

Environment

Software

  • Requirements Gateway
  • TestStand

NI Requirements Gateway (RG) is a powerful tool for managing traceability between requirements and verification artifacts. When working with custom document formats such as XML, users often need to define custom types to enable RG to correctly interpret and analyze the data. This guide walks through the process of creating and customizing XML type definitions, with references to official documentation and practical recommendations.

Before diving into custom types, ensure you have access to the official NI Requirements Gateway Reference Manual:

  • Open NIRG » Help » Getting Started with NI Requirements Gateway
  • Refer to page 45 of the manual for detailed information on custom types.

For example: 

 

Understanding Sections in Custom Types:

Sections define how RG identifies and displays structural elements in a document. Examples include:

      • Headings in Word documents
      • Files in a directory
      • Rows in a database
      • Sequences and steps in TestStand
      • Front panels and diagrams in LabVIEW VIs

Using sections helps organize and visualize traceability data more effectively, but they are not mandatory for a valid type definition.

 

 

Recommended Steps for Creating a Custom XML Type:

 

1. Create or Customize a Type Definition:

RG uses type definitions to interpret the structure of input documents. For XML files:

      • Define a custom XML type using XPath expressions to map XML elements to RG elements.
      • Store definitions in .types files:
      • Project-specific
      • Public types folder: C:\Program Files\National Instruments\Requirements Gateway\Config\types\public\public.types

 

2. Define Elements in the Type:

Use the Types pane in RG to define:

      • Requirement elements (e.g., <Requirement>)
      • Reference elements (e.g., <Covers><Verifies>)
      • Text elements (optional, for descriptive content)

Each element uses XPath to extract relevant data from the XML structure.

 

3. Configure the Project:

      • Add the XML file as a source document in your RG project.
      • Assign the custom type to the XML document.
      • Verify the file path and type association.

 

4. Run Analysis:

      • RG parses the XML using the defined type.
      • View results in the Coverage Analysis View to assess traceability.

 

 

To get a better understanding of the custom types, NI provides a tutorial project:

      • Path: <Public Documents>\National Instruments\Requirements Gateway 2018\Tutorials\CustomTypeProject.rqtf

This project serves as a practical example of how custom types are structured and used.

Next Steps

Creating custom types in NI Requirements Gateway allows for flexible integration with various document formats, especially XML. While sections are optional, they enhance clarity and structure. By following the steps outlined above and referring to the provided resources, users can effectively build and manage custom types tailored to their project needs.