Export (0) Print
Expand All

XmlDocument.Implementation Property

Gets the XmlImplementation object for the current document.

[Visual Basic]
Public ReadOnly Property Implementation As XmlImplementation
[C#]
public XmlImplementation Implementation {get;}
[C++]
public: __property XmlImplementation* get_Implementation();
[JScript]
public function get Implementation() : XmlImplementation;

Property Value

The XmlImplementation object for the current document.

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.

Example

[Visual Basic, C#, C++] The following example creates a new XmlDocument using another document's implementation.

[Visual Basic] 
Dim doc1 As New XmlDocument()
doc1.Load("books.xml")
Dim doc2 As XmlDocument = doc1.Implementation.CreateDocument()

[C#] 
XmlDocument doc1 = new XmlDocument();
 doc1.Load("books.xml");
 XmlDocument doc2 = doc1.Implementation.CreateDocument();

[C++] 
XmlDocument* doc1 = new XmlDocument();
 doc1->Load(S"books.xml");
 XmlDocument* doc2 = doc1->Implementation->CreateDocument();

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

XmlDocument Class | XmlDocument Members | System.Xml Namespace

Show:
© 2015 Microsoft