System.Xml.XmlNodeReaderNavigator.MoveToAttribute C# (CSharp) Method

MoveToAttribute() public method

public MoveToAttribute ( int attributeIndex ) : void
attributeIndex int
return void
            public void MoveToAttribute( int attributeIndex ) {
                if( this.bCreatedOnAttribute )
                    return;
                XmlAttribute attr = null;
                switch ( curNode.NodeType ) {
                    case XmlNodeType.Element:
                        CheckIndexCondition( attributeIndex );
                        attr = ((XmlElement)curNode).Attributes[attributeIndex];
                        if ( attr != null ) {
                            elemNode = curNode;
                            curNode = (XmlNode) attr;
                            attrIndex = attributeIndex;
                        }
                        break;
                    case XmlNodeType.Attribute:
                        CheckIndexCondition( attributeIndex );
                        attr = ((XmlElement)elemNode).Attributes[attributeIndex];
                        if ( attr != null ) {
                            curNode = (XmlNode) attr;
                            attrIndex = attributeIndex;
                        }
                        break;
                    case XmlNodeType.XmlDeclaration :
                    case XmlNodeType.DocumentType :
                        CheckIndexCondition( attributeIndex );
                        nAttrInd = attributeIndex;
                        break;
                }
            }

Same methods

XmlNodeReaderNavigator::MoveToAttribute ( string name ) : bool
XmlNodeReaderNavigator::MoveToAttribute ( string name, string namespaceURI ) : bool