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

GetAttribute() public method

public GetAttribute ( string name, string namespaceURI ) : string
name string
namespaceURI string
return string
		public override string GetAttribute (string name, string namespaceURI)
		{
			// 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, namespaceURI];
			if (attr == null)
				return null;	// In fact MS.NET returns null instead of String.Empty.
			else
				return attr.Value;
		}

Same methods

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