1 //------------------------------------------------------------------------------
2 // <copyright file="XmlImplementation.cs" company="Microsoft">
3 // Copyright (c) Microsoft Corporation. All rights reserved.
5 // <owner current="true" primary="true">Microsoft</owner>
6 //------------------------------------------------------------------------------
8 using System.Globalization;
10 namespace System.Xml {
12 // Provides methods for performing operations that are independent of any
13 // particular instance of the document object model.
14 public class XmlImplementation {
16 private XmlNameTable nameTable;
18 // Initializes a new instance of the XmlImplementation class.
19 public XmlImplementation() : this( new NameTable() ) {
22 public XmlImplementation( XmlNameTable nt ) {
26 // Test if the DOM implementation implements a specific feature.
27 public bool HasFeature(string strFeature, string strVersion) {
28 if (String.Compare("XML", strFeature, StringComparison.OrdinalIgnoreCase) == 0) {
29 if (strVersion == null || strVersion == "1.0" || strVersion == "2.0")
35 // Creates a new XmlDocument. All documents created from the same
36 // XmlImplementation object share the same name table.
37 public virtual XmlDocument CreateDocument() {
38 return new XmlDocument( this );
41 internal XmlNameTable NameTable {
42 get { return nameTable; }