XMLReader::moveToNextAttribute
XMLReader::moveToNextAttribute — 次の属性にカーソルを移動する
説明
class XMLReader {bool moveToNextAttribute ( void )
} 現在位置が属性ノードの場合は次の属性にカーソルを移動します。 現在位置が要素ノードの場合は最初の属性にカーソルを移動します。
返り値
成功した場合に TRUE を、失敗した場合に FALSE を返します。参考
XMLReader::moveToElement |
XMLReader::moveToAttribute |
XMLReader::moveToAttributeNo |
XMLReader::moveToAttributeNs |
XMLReader::moveToFirstAttribute |
XmlReader.MoveToNextAttribute メソッド
アセンブリ: System.Xml (system.xml.dll 内)

Dim instance As XmlReader Dim returnValue As Boolean returnValue = instance.MoveToNextAttribute
次の属性が存在する場合は true。それ以上、属性が存在しない場合は false。

現在のノードが要素ノードである場合、このメソッドは MoveToFirstAttribute と等価になります。MoveToNextAttribute が true を返す場合は、リーダーが次の属性へ移動します。それ以外の場合、リーダーの位置は変更されません。

If reader.HasAttributes Then Console.WriteLine("Attributes of <" + reader.Name + ">") While reader.MoveToNextAttribute() Console.WriteLine(" {0}={1}", reader.Name, reader.Value) End While ' Move the reader back to the element node. reader.MoveToElement() End If
if (reader.HasAttributes) { Console.WriteLine("Attributes of <" + reader.Name + ">"); while (reader.MoveToNextAttribute()) { Console.WriteLine(" {0}={1}", reader.Name, reader.Value); } // Move the reader back to the element node. reader.MoveToElement(); }

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- XMLReader::moveToNextAttributeのページへのリンク