Model Details
- Last UpdatedMar 14, 2024
- 6 minute read
To successfully export data to the 12.0 SP5 version of PDMS or later, the XML model details must conform to certain rules
XML File Document Structure
The document structure is defined in the XML schema for the P&ID profile. An output file that conforms to this document must validate against the profile schema.
The first line of the file must be an XML declaration, for example:

The document is to be encoded using UTF-8.
The root node of a file is a PlantModel element. See the Element Definitions for the definitions of its attribute and element contents.
XML elements are not defined within an XML namespace and so are not namespace qualified.
Elements are not defined within an XML namespace and so are not namespace qualified.
The following class model provides an overview of the significant structural elements contained within a P&ID profile. The arrows indicate and parent/child element relationship in the file. The elements and their attributes are defined in Element Definitions. Child elements of the ShapeCatalogue element have been omitted for clarity. Geometric and annotation elements have also been omitted.

Topology
Two elements within the file format are used to represent explicit connectivity between engineering components. These elements are:
-
Connection - on the PipingNetworkSegment and SignalLine elements
-
CrossPageConnection - on the PipeConnectorSymbol and SignalConnectorSymbol elements
PipingNetworkSegment Topology (Connection element)
Components within a PipingNetworkSegment are considered to be implicitly connected, by their main flow in and flow out connections points, in the order that they are represented in the PipingNetworkSegment. This ordering may differ between a P&ID and 3D model.
Each PipingNetworkSegment is a collection of Components with common engineering properties that define a single process flow. Where there is a junction in the flow or a change of specification the PipingNetworkSegment will terminate and be connected to PipingNetworkSegments for each subsequent flow. Subsidiary flows or connections for the purposes of instrumentation are not considered as terminating conditions for a PipingNetworkSegment
A PipingNetworkSegment, as its upstream or head reference (PipingNetworkSegment/Connection/@FromID), will reference a Nozzle, InstrumentConnection, splitting component (such as a Tee, Wye, Cross, Three Way Valve etc), Reducer, ProcessInstrument or PropertyBreak that it doesn't contain or it will reference a PipeConnectorSymbol that it contains as its first engineering component for connections to other drawings

A PipingNetworkSegment, as its downstream or tail reference (PipingNetworkSegment/Connection/@ToID), will reference a Nozzle, InstrumentConnection, merging component (such as a Tee, Wye or Cross), ProcessInstrument or PropertyBreak that it doesn't contain or it will reference a splitting component (such as a Tee, Wye or Cross), Reducer or PipeConnectorSymbol that it contains as its last engineering component.

References to contained components by the Connection element, with the exception of PipeConnectorSymbol elements, require a ToNode attribute which references the downstream ConnectionPoint of the component (for example, the main flow out of the segment).
Components contained by other segments must be referenced using a ToNode or FromNode attribute as appropriate.
References to Nozzle, PipeConnectorSymbol, PropertyBreak and ProcessInstrument elements do not require a ToNode/FromNode attribute.
The following diagrams demonstrates all permissible PipingNetworkSegment relationships expressed via the Connection element:

SignalLine Topology (Connection element)
This part of the overall specification has not been clarified.
Connections across drawings
Connections across drawings are managed by the CrossPageConnection element that is present on PipeConnectorSymbol and SignalConnectorSymbol elements. The connection is expressed by the following:
-
DrawingName - Identifying the drawing that the connection is to (optional)
-
LinkLabel - A unique key used to match with another Connector Symbol (optional)
-
LinkedPersistentID - The PersistentID of the connected Connector Symbol (optional)
Connections are only valid if:
-
The matching criteria are met in both directions
-
The connection elements are of the same type e.g. PipeConnectorSymbol -> PipeConnectorSymbol
For Example, the following would be matched if in the appropriate drawing files:

See the Element Definitions for further information.
Geometries (Axis and Reference)
All geometries in a P&ID file are accompanied by Axis and Reference elements. These define rotations around 3 dimensional axis that define how to map the coordinates defined for the item into the target environment. For most 2D drawing work the following values give the expected behaviour (for example, the coordinates are defined in the 2D drawing plane).
<Axis X="0" Y="0" Z="1"/>
<Reference X="1" Y="0" Z="0"/>
Some curve primitives such as ellipses in XMpLant require more complex use of Axis and Reference in order to define the 2D forms.
The <Axis> value defines a unit vector in 3D space about which an object should rotate. For 2D diagrams nearly all geometries will define this element as <Axis X="0" Y="0" Z="1"/> which denotes a vector aligned with the Z-axis.
The <Reference> element defines what is effectively the rotation about the <Axis> element. When you see the value written as <Reference X="1" Y="0" Z="0"/> it indicates that the X-Axis with which the object's points are defined use the same X-Axis on the output surface/window with which to orientate - in other words no rotation is required when you have the following paired elements;
<Axis X="0" Y="0" Z="1"/>
<Reference X="1" Y="0" Z="0"/>
Common variations include:
Inverted z axis (flip around y axis): <Axis X="0" Y="0" Z="-1"/>
Rotation about the origin: <Reference X="[cosØ]" Y="[sinØ]" Z="0" />
Where:
[sinØ] - is the sine of the rotation angle
[cosØ] - is the cosine of the rotation angle
The rotation is measured anti-clockwise
Character Encoding
XMpLant is encoded using UTF-8. This means that most characters used in western languages are encoded using a single byte representation, more complex characters are encoded using either a 2 byte encoding or a numerical substitution.
TagName Referencing
TagName attributes may be used to reference elements instead of referencing by the ID attribute. The P&ID profile prefers the use of ID referencing as it gives a consistent referencing mechanism that can be used regardless of the presence of a Tag attribute.
If TagName attributes are used then there is a special case for referencing Nozzle elements. In this instance the TagName is only unique within the scope of the containing Equipment element so the Equipment TagName must also be included in the reference The reference must have the form <EquipmentTagName>-<NozzleTagName> and can only be used where the <NozzleTagName> component doesn't contain a '-' character.
For example:
Where:
Equipment/@TagName = ‘VP-1234-DNJ09’
Equipment/Nozzle/@TagName = ‘N1’
The reference would be:
VP-1234-DNJ09-N1
PersistentID Referencing
As long as the context attribute used to scope PersistentID elements is at least equal in scope to the file scope then PersistentID attributes may be used for cross referencing elements. The PersistentID/@Identifier value is supported in any ItemId attribute. The PersistentID/@Context is not specified when referencing by PersistentID.