Returns an XmlNodeList containing a list of all descendant elements that match the specified Name. : XmlNode « XML « VB.Net

Home
VB.Net
1.2D
2.Application
3.Class
4.Data Structure
5.Data Types
6.Database ADO.net
7.Date Time
8.Development
9.Event
10.File Directory
11.Generics
12.GUI
13.Internationalization I18N
14.Language Basics
15.LINQ
16.Network Remote
17.Reflection
18.Security
19.Thread
20.Windows Presentation Foundation
21.Windows System
22.XML
23.XML LINQ
VB.Net » XML » XmlNode 




Returns an XmlNodeList containing a list of all descendant elements that match the specified Name.
 


Imports System
Imports System.IO
Imports System.Xml

public class Sample

  public shared sub Main()

    Dim doc as XmlDocument = new XmlDocument()
    doc.Load("2books.xml")

     Dim root as XmlElement = doc.DocumentElement
     Dim elemList as XmlNodeList = root.GetElementsByTagName("title")
     Dim i as integer
     for i=0  to elemList.Count-1
        Console.WriteLine(elemList.ItemOf(i).InnerXml)
     next

  end sub
end class

   
  














Related examples in the same category
1.Creates an XmlNode with the specified node type, Name, and NamespaceURI.
2.Creates an XmlNode with the specified XmlNodeType, Name, and NamespaceURI.
3.Creates a XmlNode with the specified XmlNodeType, Prefix, Name, and NamespaceURI.
4.Returns an XmlNodeList containing a list of all descendant elements that match the specified Name.
5.Creates XmlNode based on the information in XmlReader
6.XmlNode.CloneNode creates a duplicate of the node.
7.Provides support for the for each style iteration over the nodes in the XmlNode.
8.XmlNode.GetPrefixOfNamespace
9.XmlNode.InsertAfter inserts the specified node immediately after the specified reference node.
10.XmlNode.InsertBefore inserts the specified node immediately before the specified reference node.
11.XmlNode.Item gets the first child element with the specified Name.
12.XmlNode.LastChild gets the last child of the node.
13.XmlNode.NextSibling gets the node immediately following this node.
14.XmlNode.SelectNodes Method (String, XmlNamespaceManager)
15.Selects the first XmlNode that matches the XPath expression.
16.XmlNode.SelectSingleNode Method (String, XmlNamespaceManager)
17.XmlNode.WriteContentTo saves all the child nodes of the node to the specified XmlWriter.
18.XmlNode.WriteTo saves the current node to the specified XmlWriter.
19.Create XmlTextReader class with the specified string, XmlNodeType, and XmlParserContext.
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.