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

◆ GetPrefixOfNamespace()

string System.Xml.Linq.XAttribute.GetPrefixOfNamespace ( XNamespace ns)
inlinepackage

Definition at line 412 of file XAttribute.cs.

413 {
414 string namespaceName = ns.NamespaceName;
415 if (namespaceName.Length == 0)
416 {
417 return string.Empty;
418 }
419 if (parent != null)
420 {
421 return ((XElement)parent).GetPrefixOfNamespace(ns);
422 }
423 if ((object)namespaceName == "http://www.w3.org/XML/1998/namespace")
424 {
425 return "xml";
426 }
427 if ((object)namespaceName == "http://www.w3.org/2000/xmlns/")
428 {
429 return "xmlns";
430 }
431 return null;
432 }
XContainer parent
Definition XObject.cs:7

References System.Xml.Linq.XNamespace.NamespaceName, and System.Xml.Linq.XObject.parent.

Referenced by System.Xml.Linq.XAttribute.ToString().