Illegal characters in Model xml file|OPC UA Implementation: Stacks, Tools, and Samples|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
Illegal characters in Model xml file
Avatar
Peter Franklin
Member
Members
Forum Posts: 24
Member Since:
04/14/2020
sp_UserOfflineSmall Offline
1
09/29/2020 - 17:22
sp_Permalink sp_Print

In the model xml file, I have a ':' character and a '~' in some SymbolicName attributes for Object elements. These characters are causing exceptions to be thrown while running ModelCompiler. They fail in different ways, the colon I think because it is also the namespace prefix delimiter, but the '~' fails in a method Validate2() in the ModelCompiler.

Is there some way to include these characters by escaping them, or encoding them in the xml? Or are they even allowed in OPCUA spec?

Also, same question for BrowseName text, can those characters be embedded in the content of the xml element?

How can I get these characters through the modelcompiler so that they are exposed in OPCUA?

Avatar
Randy Armstrong
Admin
Forum Posts: 1555
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
09/29/2020 - 19:21
sp_Permalink sp_Print

The SymbolicName is limited to characters that can be used for variable names in programming languages.

If you have BrowseNames that have special characters then you need to explicitly define the BrowseName element and choose a different SymbolicName.

Any characters that cause problems for XML parsers need to be escaped using XML conventions. i.e. '<' becomes '&lt;'.

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 23
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1425
Posts: 4825