System.Xml.XmlNodeReaderImpl.XmlNodeReaderImpl.GetAttribute C# (CSharp) Method

GetAttribute() public method

public GetAttribute ( string name ) : string
name string
return string
		public override string GetAttribute (string name)
		{
			// This is MS.NET bug which returns attributes in spite of EndElement.
			if (isEndElement || current == null)
				return null;

			if (NodeType == XmlNodeType.XmlDeclaration)
				return GetXmlDeclarationAttribute (name);
			else if (NodeType == XmlNodeType.DocumentType)
				return GetDocumentTypeAttribute (name);

			if (ownerLinkedNode.Attributes == null)
				return null;
			XmlAttribute attr = ownerLinkedNode.Attributes [name];
			if (attr == null)
				return null;
			else
				return attr.Value;
		}

Same methods

XmlNodeReaderImpl.XmlNodeReaderImpl::GetAttribute ( int attributeIndex ) : string
XmlNodeReaderImpl.XmlNodeReaderImpl::GetAttribute ( string name, string namespaceURI ) : string