Imported Upstream version 4.0.0~alpha1

Former-commit-id: 806294f5ded97629b74c85c09952f2a74fe182d9
This commit is contained in:
Jo Shields
2015-04-07 09:35:12 +01:00
parent 283343f570
commit 3c1f479b9d
22469 changed files with 2931443 additions and 869343 deletions

View File

@@ -0,0 +1,45 @@
//------------------------------------------------------------------------------
// <copyright file="XmlImplementation.cs" company="Microsoft">
// Copyright (c) Microsoft Corporation. All rights reserved.
// </copyright>
// <owner current="true" primary="true">[....]</owner>
//------------------------------------------------------------------------------
using System.Globalization;
namespace System.Xml {
// Provides methods for performing operations that are independent of any
// particular instance of the document object model.
public class XmlImplementation {
private XmlNameTable nameTable;
// Initializes a new instance of the XmlImplementation class.
public XmlImplementation() : this( new NameTable() ) {
}
public XmlImplementation( XmlNameTable nt ) {
nameTable = nt;
}
// Test if the DOM implementation implements a specific feature.
public bool HasFeature(string strFeature, string strVersion) {
if (String.Compare("XML", strFeature, StringComparison.OrdinalIgnoreCase) == 0) {
if (strVersion == null || strVersion == "1.0" || strVersion == "2.0")
return true;
}
return false;
}
// Creates a new XmlDocument. All documents created from the same
// XmlImplementation object share the same name table.
public virtual XmlDocument CreateDocument() {
return new XmlDocument( this );
}
internal XmlNameTable NameTable {
get { return nameTable; }
}
}
}