Glossary · Modelling

NodeSet2

In OPC UA, NodeSet2 is the normative XML serialisation of an address space, defined as UANodeSet in Part 6 Annex F. Every released companion specification ships as a .NodeSet2.xml file: node definitions, references, a Model element with version and publication date, and the models it requires.

What the file contains

A UANodeSet document holds a NamespaceUris list, a Models block, an Aliases block that shortens common NodeIds, and then one element per node - UAObjectType, UAVariable, UAMethod, UADataType and so on - each with its attributes and its References. The schema is Schema/UANodeSet.xsd in the OPCFoundation/UA-Nodeset repository. Because the format describes nodes rather than a proprietary project, any tool and any SDK can consume the same file: this is the interchange format of the whole ecosystem.

The Model element is the version contract

Each nodeset declares its ModelUri, Version and PublicationDate, plus a RequiredModel entry per dependency with the version and date it was built against. That block is how a server or a tool decides whether it can load the file at all, and it is the fastest way to answer which generation of a companion specification a machine speaks. The MTConnect nodeset is a useful counter-example: it ships with no Model element, which is itself a statement about how maintained it is.

What else ships alongside

Per released specification the OPC Foundation publishes the .NodeSet2.xml plus .Types.xsd (XML schema for the DataTypes), .Types.bsd (the OPC Binary schema, marked obsolete in the repository readme), and .NodeIds.csv. Non-normative support files include .Classes.cs, .Constants.cs and .PredefinedNodes.uanodes, and where a working group used the ModelCompiler, .Model.xml and .Model.csv. The documentation CSV shipped with each nodeset maps every standard NodeId to its spec section and its conformance units.

The toolchain that produces and consumes it

UA-ModelCompiler is the OPC Foundation's generator: install it with dotnet tool install --global OPCFoundation.Opc.Ua.ModelCompiler.Tool, then compile a Model Design XML into a nodeset, XSD, BSD, C# classes and identifier CSVs, or run compile-nodesets over existing NodeSet2 files. UaModeler and SiOME are the GUI authoring alternatives. The UA Cloud Library at uacloudlibrary.opcfoundation.org hosts and serves nodesets over a REST API with Swagger, and the .NET reference stack supports both nodeset import at runtime and nodeset export from a live server.

Example

A minimal NodeSet2 file: one ObjectType with one Mandatory Variable

<UANodeSet xmlns="http://opcfoundation.org/UA/2011/03/UANodeSet.xsd">
  <NamespaceUris>
    <Uri>http://example.com/PlantA/Line3/</Uri>
  </NamespaceUris>
  <Models>
    <Model ModelUri="http://example.com/PlantA/Line3/"
           Version="1.0.0" PublicationDate="2026-09-01T00:00:00Z">
      <RequiredModel ModelUri="http://opcfoundation.org/UA/"
                     Version="1.05.07" PublicationDate="2026-07-30T00:00:00Z"/>
      <RequiredModel ModelUri="http://opcfoundation.org/UA/Machinery/"
                     Version="1.04.1" PublicationDate="2026-01-01T00:00:00Z"/>
    </Model>
  </Models>
  <Aliases>
    <Alias Alias="Double">i=11</Alias>
    <Alias Alias="HasComponent">i=47</Alias>
    <Alias Alias="HasTypeDefinition">i=40</Alias>
    <Alias Alias="HasModellingRule">i=37</Alias>
    <Alias Alias="HasSubtype">i=45</Alias>
  </Aliases>

  <UAObjectType NodeId="ns=1;i=1001" BrowseName="1:MixerType">
    <DisplayName>MixerType</DisplayName>
    <References>
      <Reference ReferenceType="HasSubtype" IsForward="false">i=58</Reference>
      <Reference ReferenceType="HasComponent">ns=1;i=2001</Reference>
    </References>
  </UAObjectType>

  <UAVariable NodeId="ns=1;i=2001" BrowseName="1:Temperature"
              DataType="Double" ParentNodeId="ns=1;i=1001">
    <DisplayName>Temperature</DisplayName>
    <References>
      <Reference ReferenceType="HasTypeDefinition">i=63</Reference>
      <Reference ReferenceType="HasModellingRule">i=78</Reference>
      <Reference ReferenceType="HasComponent" IsForward="false">ns=1;i=1001</Reference>
    </References>
  </UAVariable>
</UANodeSet>

i=78 is the Mandatory modelling rule. Drop that reference and the
Variable stays part of the type but is never instantiated.
The mistake people make: Editing a nodeset by hand and leaving the Model element alone. Consumers key on ModelUri plus PublicationDate to decide whether a dependency is satisfied and whether a cached copy is current, so a changed file that still claims the old date will load in one tool, be silently rejected by another, and produce two servers that disagree about the same namespace URI.

Defined in: Part 6 - Mappings, Annex F defines the UANodeSet schema; the schema file and the released nodesets live in the OPCFoundation/UA-Nodeset repository.

Last verified 7 September 2026 against OPC UA 1.05.07. OPC UA Connect is an educational resource and is not affiliated with the OPC Foundation.

Free download
OPC UA Server Acceptance Test Pack
A 40-check acceptance test you run against a vendor's server before commissioning sign-off. Weighted scoring, three hard gates, and a one-page verdict for the supplier meeting.
Get the free test pack →
Free, no course, no login