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

◆ CloneNode()

override XmlNode System.Xml.XmlElement.CloneNode ( bool deep)
inline

Definition at line 198 of file XmlElement.cs.

199 {
200 XmlDocument ownerDocument = OwnerDocument;
205 if (xmlElement.IsEmpty != IsEmpty)
206 {
208 }
209 if (HasAttributes)
210 {
211 foreach (XmlAttribute attribute in Attributes)
212 {
213 XmlAttribute xmlAttribute2 = (XmlAttribute)attribute.CloneNode(deep: true);
214 if (xmlAttribute2 is XmlUnspecifiedAttribute xmlUnspecifiedAttribute && !attribute.Specified)
215 {
216 xmlUnspecifiedAttribute.SetSpecified(f: false);
217 }
218 xmlElement.Attributes.InternalAppendAttribute(xmlAttribute2);
219 }
220 }
221 if (deep)
222 {
223 xmlElement.CopyChildren(ownerDocument, this, deep);
224 }
225 return xmlElement;
226 }
override string NamespaceURI
Definition XmlElement.cs:31
override string LocalName
Definition XmlElement.cs:29
override XmlDocument OwnerDocument
Definition XmlElement.cs:49
XmlElement(XmlName name, bool empty, XmlDocument doc)
override XmlAttributeCollection Attributes
Definition XmlElement.cs:93
override string Prefix
Definition XmlElement.cs:34
virtual bool HasAttributes

References System.Xml.XmlElement.Attributes, System.Xml.XmlNode.Attributes, System.Xml.XmlAttribute.CloneNode(), System.Xml.XmlNode.CopyChildren(), System.Xml.Dictionary, System.Xml.XmlElement.HasAttributes, System.Xml.XmlAttributeCollection.InternalAppendAttribute(), System.Xml.XmlElement.IsEmpty, System.Xml.XmlDocument.IsLoading, System.Xml.XmlElement.LocalName, System.Xml.XmlElement.NamespaceURI, System.Xml.XmlElement.OwnerDocument, System.Xml.XmlElement.Prefix, and System.Xml.XmlUnspecifiedAttribute.Specified.