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

◆ WriteStartElement()

void System.Xml.Linq.ElementWriter.WriteStartElement ( XElement e)
inlineprivate

Definition at line 197 of file ElementWriter.cs.

198 {
199 PushElement(e);
200 XNamespace @namespace = e.Name.Namespace;
201 _writer.WriteStartElement(GetPrefixOfNamespace(@namespace, allowDefaultNamespace: true), e.Name.LocalName, @namespace.NamespaceName);
202 XAttribute xAttribute = e.lastAttr;
203 if (xAttribute != null)
204 {
205 do
206 {
207 xAttribute = xAttribute.next;
208 @namespace = xAttribute.Name.Namespace;
209 string localName = xAttribute.Name.LocalName;
210 string namespaceName = @namespace.NamespaceName;
211 _writer.WriteAttributeString(GetPrefixOfNamespace(@namespace, allowDefaultNamespace: false), localName, (namespaceName.Length == 0 && localName == "xmlns") ? "http://www.w3.org/2000/xmlns/" : namespaceName, xAttribute.Value);
212 }
213 while (xAttribute != e.lastAttr);
214 }
215 }

References System.Xml.Dictionary, System.Xml.Linq.XElement.lastAttr, System.Xml.Linq.XName.LocalName, System.Xml.Linq.XAttribute.Name, System.Xml.Linq.XElement.Name, System.Xml.Linq.XAttribute.next, System.Xml.Linq.ElementWriter.PushElement(), and System.Xml.Linq.XAttribute.Value.

Referenced by System.Xml.Linq.ElementWriter.WriteElement().