XmlModel.Document Property
Gets the XDocument object that represents the current parse tree for the XML Editor buffer.
Namespace: Microsoft.VisualStudio.XmlEditor
Assembly: Microsoft.VisualStudio.XmlEditor (in Microsoft.VisualStudio.XmlEditor.dll)
Syntax
public abstract XDocument Document { get; }
public:
property XDocument^ Document {
virtual XDocument^ get() abstract;
}
abstract Document : XDocument with get
Public MustOverride ReadOnly Property Document As XDocument
Property Value
Type: System.Xml.Linq.XDocument
The XDocument object that represents the current parse tree for the XML Editor buffer.
Remarks
You can keep this object until the next BufferReloaded event. The XML Editor has an incremental parser that tries to preserve the identity of an XNode. This means that you can keep any XNode in this parse tree until an XmlModelChange renders that node invalid.
See Also
XmlModel Class
Microsoft.VisualStudio.XmlEditor Namespace
Return to top