XmlDocument.IsReadOnly Property
.NET Framework 4
Gets a value indicating whether the current node is read-only.
Assembly: System.Xml (in System.Xml.dll)
Property Value
Type: System.Booleantrue if the current node is read-only; otherwise false. XmlDocument nodes always return false.
The following example shows how to use the IsReadOnly property.
using System; using System.IO; using System.Xml; public class Sample { public static void Main() { //Create the XmlDocument. XmlDocument doc = new XmlDocument(); doc.LoadXml("<!DOCTYPE book [<!ENTITY h 'hardcover'>]>" + "<book genre='novel' ISBN='1-861001-57-5'>" + "<title>Pride And Prejudice</title>" + "<style>&h;</style>" + "</book>"); //Determine whether the node is read-only. if (doc.DocumentElement.LastChild.FirstChild.IsReadOnly) Console.WriteLine("Entity reference nodes are always read-only"); } }
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.