Opc.Ua.XmlDecoder.LoadStringTable C# (CSharp) Method

LoadStringTable() public method

Initializes a string table from an XML stream.
public LoadStringTable ( string tableName, string elementName, StringTable stringTable ) : bool
tableName string Name of the table.
elementName string Name of the element.
stringTable StringTable The string table.
return bool
        public bool LoadStringTable(string tableName, string elementName, StringTable stringTable)
        {
            PushNamespace(Namespaces.OpcUaXsd);

            try
            {
                if (!Peek(tableName))
                {
                    return false;
                }

                ReadStartElement();

                while (Peek(elementName))
                {
                    string namespaceUri = ReadString(elementName);
                    stringTable.Append(namespaceUri);
                }

                Skip(new XmlQualifiedName(tableName, Namespaces.OpcUaXsd));
                return true;
            }
            finally
            {
                PopNamespace();
            }
        }