XmlNode.NextSibling プロパティ
アセンブリ: System.Xml (system.xml.dll 内)

次の XmlNode。次のノードがない場合は、null 参照 (Visual Basic では Nothing) が返されます。

XML ドキュメント内のすべての書籍を表示する例を次に示します。
Imports System Imports System.Xml Imports Microsoft.VisualBasic public class Sample public shared sub Main() Dim doc as XmlDocument = new XmlDocument() doc.Load("books.xml") Dim currNode as XmlNode = doc.DocumentElement.FirstChild Console.WriteLine("First book...") Console.WriteLine(currNode.OuterXml) Dim nextNode as XmlNode = currNode.NextSibling Console.WriteLine(ControlChars.LF + "Second book...") Console.WriteLine(nextNode.OuterXml) end sub end class
using System; using System.Xml; public class Sample { public static void Main() { XmlDocument doc = new XmlDocument(); doc.Load("books.xml"); XmlNode currNode = doc.DocumentElement.FirstChild; Console.WriteLine("First book..."); Console.WriteLine(currNode.OuterXml); XmlNode nextNode = currNode.NextSibling; Console.WriteLine("\r\nSecond book..."); Console.WriteLine(nextNode.OuterXml); } }
#using <System.Xml.dll> using namespace System; using namespace System::Xml; int main() { XmlDocument^ doc = gcnew XmlDocument; doc->Load( "books.xml" ); XmlNode^ currNode = doc->DocumentElement->FirstChild; Console::WriteLine( "First book..." ); Console::WriteLine( currNode->OuterXml ); XmlNode^ nextNode = currNode->NextSibling; Console::WriteLine( "\r\nSecond book..." ); Console::WriteLine( nextNode->OuterXml ); }
import System.*; import System.Xml.*; public class Sample { public static void main(String[] args) { XmlDocument doc = new XmlDocument(); doc.Load("books.xml"); XmlNode currNode = doc.get_DocumentElement().get_FirstChild(); Console.WriteLine("First book..."); Console.WriteLine(currNode.get_OuterXml()); XmlNode nextNode = currNode.get_NextSibling(); Console.WriteLine("\r\nSecond book..."); Console.WriteLine(nextNode.get_OuterXml()); } //main } //Sample

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からXmlNode.NextSibling プロパティを検索する場合は、下記のリンクをクリックしてください。

- XmlNode.NextSibling プロパティのページへのリンク