本文整理汇总了VB.NET中System.Xml.IHasXmlNode接口的典型用法代码示例。如果您正苦于以下问题:VB.NET IHasXmlNode接口的具体用法?VB.NET IHasXmlNode怎么用?VB.NET IHasXmlNode使用的例子?那么恭喜您, 这里精选的接口代码示例或许可以为您提供帮助。
在下文中一共展示了IHasXmlNode接口的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: Sample
' 导入命名空间
Imports System.IO
Imports System.Xml
Imports System.Xml.XPath
public class Sample
public shared sub Main()
Dim doc as XmlDocument = new XmlDocument()
doc.Load("books.xml")
' Create an XPathNavigator and select all books by Plato.
Dim nav as XPathNavigator = doc.CreateNavigator()
Dim ni as XPathNodeIterator = nav.Select("descendant::book[author/name='Plato']")
ni.MoveNext()
' Get the first matching node and change the book price.
Dim book as XmlNode = CType(ni.Current, IHasXmlNode).GetNode()
book.LastChild.InnerText = "12.95"
Console.WriteLine(book.OuterXml)
end sub
end class