Mega Code Archive

 
Categories / VB.Net / XML
 

Gets a value indicating whether the current node is read-only

Option Explicit Option Strict Imports System Imports System.IO Imports System.Xml Public Class Sample     Public Shared Sub Main()         'Create the XmlDocument.         Dim doc As New XmlDocument()         doc.LoadXml("<!DOCTYPE book [<!ENTITY h 'hardcover'>]>" & _                     "<book genre='Computer' ISBN='1-111111-57-5'>" & _                     "<title>C#</title>" & _                     "<style>&h;</style>" & _                     "</book>")         If doc.DocumentElement.LastChild.FirstChild.IsReadOnly Then             Console.WriteLine("Entity reference nodes are always read-only")         End If      End Sub 'Main End Class 'Sample