Edit

Share via


XmlDocument.Implementation Property

Definition

Gets the XmlImplementation object for the current document.

public:
 property System::Xml::XmlImplementation ^ Implementation { System::Xml::XmlImplementation ^ get(); };
public System.Xml.XmlImplementation Implementation { get; }
member this.Implementation : System.Xml.XmlImplementation
Public ReadOnly Property Implementation As XmlImplementation

Property Value

The XmlImplementation object for the current document.

Examples

The following example creates a new XmlDocument using another document's implementation.

XmlDocument^ doc1 = gcnew XmlDocument;
doc1->Load( "books.xml" );
XmlDocument^ doc2 = doc1->Implementation->CreateDocument();
XmlDocument doc1 = new XmlDocument();
 doc1.Load("books.xml");
 XmlDocument doc2 = doc1.Implementation.CreateDocument();
Dim doc1 As New XmlDocument()
doc1.Load("books.xml")
Dim doc2 As XmlDocument = doc1.Implementation.CreateDocument()

Remarks

XmlDocument objects created from the same XmlImplementation share the same XmlNameTable. This allows users to compare attribute and element names as objects rather than strings.

Although the XmlDocument objects share the same implementation, to move nodes from one document to another you must use the ImportNode method.

Applies to