Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ AddNamespace()

void System.Xml.XmlSubtreeReader.AddNamespace ( string prefix,
string ns )
inlineprivate

Definition at line 1149 of file XmlSubtreeReader.cs.

1150 {
1152 int num = _nsAttrCount++;
1153 if (_nsAttributes == null)
1154 {
1156 }
1157 if (num == _nsAttributes.Length)
1158 {
1159 NodeData[] array = new NodeData[_nsAttributes.Length * 2];
1160 Array.Copy(_nsAttributes, array, num);
1162 }
1163 string localName;
1164 string prefix2;
1165 string name;
1166 if (prefix.Length == 0)
1167 {
1168 localName = _xmlns;
1169 prefix2 = string.Empty;
1170 name = _xmlns;
1171 }
1172 else
1173 {
1174 localName = prefix;
1175 prefix2 = _xmlns;
1176 name = reader.NameTable.Add(_xmlns + ":" + prefix);
1177 }
1178 if (_nsAttributes[num] == null)
1179 {
1180 _nsAttributes[num] = new NodeData(XmlNodeType.Attribute, localName, prefix2, name, _xmlnsUri, ns);
1181 }
1182 else
1183 {
1184 _nsAttributes[num].Set(XmlNodeType.Attribute, localName, prefix2, name, _xmlnsUri, ns);
1185 }
1186 _state = State.ClearNsAttributes;
1187 _curNsAttr = -1;
1188 }
string Add(char[] array, int offset, int length)
virtual void AddNamespace(string prefix, string uri)
XmlNameTable NameTable
Definition XmlReader.cs:116
void Set(XmlNodeType nodeType, string localName, string prefix, string name, string namespaceUri, string value)
readonly XmlNamespaceManager _nsManager

References System.Xml.XmlSubtreeReader._curNsAttr, System.Xml.XmlSubtreeReader._nsAttrCount, System.Xml.XmlSubtreeReader._nsAttributes, System.Xml.XmlSubtreeReader._nsManager, System.Xml.XmlSubtreeReader._state, System.Xml.XmlSubtreeReader._xmlns, System.Xml.XmlSubtreeReader._xmlnsUri, System.Xml.XmlNameTable.Add(), System.Xml.XmlNamespaceManager.AddNamespace(), System.array, System.Array.Copy(), System.Xml.Dictionary, System.Xml.XmlSubtreeReader.InitialNamespaceAttributeCount, System.Xml.XmlReader.NameTable, System.prefix, System.Xml.XmlWrappingReader.reader, and System.Xml.XmlSubtreeReader.NodeData.Set().

Referenced by System.Xml.XmlSubtreeReader.ProcessNamespaces().