OPCFoundation / UA-ModelCompiler

ModelCompiler converts XML files into C# and ANSI C
MIT License
151 stars 92 forks source link

Parsing Error in XML File #26

Closed adeel1996 closed 5 years ago

adeel1996 commented 5 years ago

I am new to OPC-UA. I have created basic XML file for the following hierarchy but I am getting parsing Error can you please identify my mistake. (Nodes Hierarchy ) Plant Line Number Sensor1 Voltage A Voltage B

Following is my XML code.

`<?xml version='1.0' encoding='utf-8'?>

http://opcfoundation.org/UA/Sensor/ i=10 i=35 i=40 i=46 Plant Plant i=85 i=61 i=20002 LineNumber LineNumber i=20001 i=61 i=20003 Sensor1 The base type for all object nodes. i=20002 i=58 i=20004 i=20005 VoltageA VoltageA i=20003 i=68 9.99 VoltageB VoltageB i=20003 i=68 9.99

`

I will also attach screenshot of error message I am getting. parsingerror

sixdiamants commented 5 years ago

The model compiler can indeed produce XML that doesn't validate. The presence of spaces and dashes could for instance cause parsing errors. You may have to replace

Sensor-1 by Sensor_1

If I recall well, LocalizedNames allow spaces, dashes and non-ASCII.

adeel1996 commented 5 years ago

@sixdiamants there is no '-' or '_' in xml file. I have used 'sensor1'. it was my mistake I write 'sensor-1' when writing hierarchy in description.

NichtEuler commented 5 years ago

It seems like the input xml must be a ModelDesign and not a NodeSet2.xml.

opcfoundation-org commented 5 years ago

Yes - the ModelDesign is the input. The UANodeSet is the output. The ModelDesign schema is design for humans that manually edit. The UANodeSet is machine readable.