blob: 0082d7faf2f4e636f3c4c35e1b8177d2d292a41f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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; }
}
}
}
|