System.Xml.XmlNodeReader.MoveToAttribute C# (CSharp) Méthode

MoveToAttribute() public méthode

public MoveToAttribute ( string name ) : bool
name string
Résultat bool
        public override bool MoveToAttribute(string name) {
            if ( !IsInReadingStates() )
                return false;
            readerNav.ResetMove( ref curDepth, ref nodeType );
            if ( readerNav.MoveToAttribute( name ) ) { //, ref curDepth ) ) {
                curDepth++;
                nodeType = readerNav.NodeType;
                if ( bInReadBinary ) {
                    FinishReadBinary();
                }
                return true;
            }
            readerNav.RollBackMove(ref curDepth);
            return false;
        }

Same methods

XmlNodeReader::MoveToAttribute ( string name, string namespaceURI ) : bool
XmlNodeReader::MoveToAttribute ( int attributeIndex ) : void

Usage Example

 private void process_package_tag(XmlNodeReader nodeReader, SobekCM_Item thisPackage)
 {
     // Get the value of whether this is a new package
     if (nodeReader.HasAttributes)
     {
         // Move to what should be the bib id attribute
         nodeReader.MoveToAttribute(0);
         if (nodeReader.Name == "new")
         {
             thisPackage.METS_Header.RecordStatus_Enum = METS_Record_Status.COMPLETE;
         }
     }
 }
All Usage Examples Of System.Xml.XmlNodeReader::MoveToAttribute