Skip to main content
Version: 2.7

File Data Access

Each data access node must contain one of the following address types:

Content ModelStarts withType
WholeTextWholeTextConstant String
XML/X-Path Language
JSON$.JSONPath notation

Each address must start with the specified string. The plugin navigates dependent on the data address through the content model of the file and reads the text under this address. Each Address supports read, write and receive access. In write mode, the plugin overwrites the file with the appropriately changed value.

The following address examples explain the behavior.

Whole Text Address

Data node example:

{
"Id": "{F784EEF0-BA9C-4DEA-ABD5-B2061DC86B19}",
"Name": "Whole Content of the file",
"DataClass": "Event",
"DataType": "System.String",
"Address": "WholeText",
"Access": {
"Read": true,
"Receive": true
},
"Properties": []
}

Content of the file and the value of the data node are identical.

Example:

<?xml version="1.0" encoding="utf-8"?>
<File>
<Data id="1">
<Value>125</Value>
</Data>
</File>

XML Address

Data node example:

{
"Id": "{D16D3ED7-BC14-4D5D-9B55-DC25F8C6EF96}",
"Name": "Data Value 1",
"DataClass": "Event",
"DataType": "System.Int32",
"Address": "/File/Data[@id='2']/Value",
"Access": {
"Read": true,
"Receive": true
},
"Properties": []
}

Content of the file:

<?xml version="1.0" encoding="utf-8"?>
<File>
<Data id="1">
<Value>125</Value>
</Data>
<Data id="2">
<Value>14</Value>
</Data>
<Data id="3">
<Value>-114</Value>
</Data>
<Data id="4">
<Value>99.82</Value>
</Data>
</File>

Value of the Int32 data node = '14'

JSON Address

Data node example:

{
"Id": "{59A602FA-6002-4276-A21C-540349F238AA}",
"Name": "Data Value 1",
"DataClass": "Event",
"DataType": "System.String",
"Address": "$.DataItems[0].Value",
"Access": {
"Read": true,
"Receive": true
},
"Properties": []
}

Content of the file:

{
"DataItems": [
{
"DataType": "System.String",
"Value": "Hello World"
},
{
"DataType": "System.Int32",
"Value": 14
},
{
"DataType": "System.Int32",
"Value": -114
},
{
"DataType": "System.Double",
"Value": 99.82
}
]
}

Value of the string data node = 'Hello World'