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

◆ GetAttribute() [3/4]

override string System.Xml.Linq.XNodeReader.GetAttribute ( string name)
inline

Definition at line 487 of file XNodeReader.cs.

488 {
489 if (!IsInteractive)
490 {
491 return null;
492 }
494 if (elementInAttributeScope != null)
495 {
497 XAttribute xAttribute = elementInAttributeScope.lastAttr;
498 if (xAttribute != null)
499 {
500 do
501 {
502 xAttribute = xAttribute.next;
503 if (xAttribute.Name.LocalName == localName && xAttribute.Name.NamespaceName == namespaceName)
504 {
506 {
507 return null;
508 }
509 return xAttribute.Value;
510 }
511 }
512 while (xAttribute != elementInAttributeScope.lastAttr);
513 }
514 return null;
515 }
516 if (_source is XDocumentType xDocumentType)
517 {
518 if (name == "PUBLIC")
519 {
520 return xDocumentType.PublicId;
521 }
522 if (name == "SYSTEM")
523 {
524 return xDocumentType.SystemId;
525 }
526 }
527 return null;
528 }
bool IsDuplicateNamespaceAttribute(XAttribute candidateAttribute)
XElement GetElementInAttributeScope()
static void GetNameInAttributeScope(string qualifiedName, XElement e, out string localName, out string namespaceName)
readonly bool _omitDuplicateNamespaces

References System.Xml.Linq.XNodeReader._omitDuplicateNamespaces, System.Xml.Linq.XNodeReader._source, System.Xml.Dictionary, System.Xml.Linq.XNodeReader.GetElementInAttributeScope(), System.Xml.Linq.XNodeReader.GetNameInAttributeScope(), System.Xml.Linq.XNodeReader.IsDuplicateNamespaceAttribute(), System.Xml.Linq.XNodeReader.IsInteractive, System.Xml.Linq.XAttribute.next, and System.Xml.Linq.XAttribute.Value.