protected internal XmlDocument(XmlImplementation imp) : base() { _implementation = imp; _domNameTable = new DomNameTable(this); // force the following string instances to be default in the nametable XmlNameTable nt = this.NameTable; nt.Add(string.Empty); strDocumentName = nt.Add("#document"); strDocumentFragmentName = nt.Add("#document-fragment"); strCommentName = nt.Add("#comment"); strTextName = nt.Add("#text"); strCDataSectionName = nt.Add("#cdata-section"); strEntityName = nt.Add("#entity"); strID = nt.Add("id"); strNonSignificantWhitespaceName = nt.Add("#whitespace"); strSignificantWhitespaceName = nt.Add("#significant-whitespace"); strXmlns = nt.Add("xmlns"); strXml = nt.Add("xml"); strSpace = nt.Add("space"); strLang = nt.Add("lang"); strReservedXmlns = nt.Add(XmlConst.ReservedNsXmlNs); strReservedXml = nt.Add(XmlConst.ReservedNsXml); strEmpty = nt.Add(String.Empty); baseURI = String.Empty; objLock = new object(); }
public static void HasFeatureReturnsTrueForSupportedVersion() { var target = new XmlImplementation(); Assert.True(target.HasFeature(SupportedFeature, null)); Assert.True(target.HasFeature(SupportedFeature, "1.0")); Assert.True(target.HasFeature(SupportedFeature, "2.0")); }
protected internal XmlDocument(XmlImplementation imp) : base() { implementation = imp; domNameTable = new DomNameTable(this); // force the following string instances to be default in the nametable XmlNameTable nt = this.NameTable; nt.Add(string.Empty); strDocumentName = nt.Add("#document"); strDocumentFragmentName = nt.Add("#document-fragment"); strCommentName = nt.Add("#comment"); strTextName = nt.Add("#text"); strCDataSectionName = nt.Add("#cdata-section"); strEntityName = nt.Add("#entity"); strID = nt.Add("id"); strNonSignificantWhitespaceName = nt.Add("#whitespace"); strSignificantWhitespaceName = nt.Add("#significant-whitespace"); strXmlns = nt.Add("xmlns"); strXml = nt.Add("xml"); strSpace = nt.Add("space"); strLang = nt.Add("lang"); strReservedXmlns = nt.Add(XmlConst.ReservedNsXmlNs); strReservedXml = nt.Add(XmlConst.ReservedNsXml); strEmpty = nt.Add(String.Empty); baseURI = String.Empty; objLock = new object(); }
public static void HasFeatureReturnsTrueForSupportedFeature() { var target = new XmlImplementation(); // verify that it's also case-insensitive Assert.True(target.HasFeature(SupportedFeature.ToUpper(), null)); Assert.True(target.HasFeature(SupportedFeature.ToLower(), null)); }
protected internal XmlDocument(XmlImplementation imp) { this.implementation = imp; this.domNameTable = new DomNameTable(this); XmlNameTable nameTable = this.NameTable; nameTable.Add(string.Empty); this.strDocumentName = nameTable.Add("#document"); this.strDocumentFragmentName = nameTable.Add("#document-fragment"); this.strCommentName = nameTable.Add("#comment"); this.strTextName = nameTable.Add("#text"); this.strCDataSectionName = nameTable.Add("#cdata-section"); this.strEntityName = nameTable.Add("#entity"); this.strID = nameTable.Add("id"); this.strNonSignificantWhitespaceName = nameTable.Add("#whitespace"); this.strSignificantWhitespaceName = nameTable.Add("#significant-whitespace"); this.strXmlns = nameTable.Add("xmlns"); this.strXml = nameTable.Add("xml"); this.strSpace = nameTable.Add("space"); this.strLang = nameTable.Add("lang"); this.strReservedXmlns = nameTable.Add("http://www.w3.org/2000/xmlns/"); this.strReservedXml = nameTable.Add("http://www.w3.org/XML/1998/namespace"); this.strEmpty = nameTable.Add(string.Empty); this.baseURI = string.Empty; this.objLock = new object(); }
public static void TestForFeatureSome() { var imp = new XmlImplementation(); Assert.False(imp.HasFeature("some", "1.0")); Assert.False(imp.HasFeature("some", "2.0")); Assert.False(imp.HasFeature("some", "3.0")); }
public static void CreateDocument() { var imp = new XmlImplementation(); var doc1 = imp.CreateDocument(); var doc2 = imp.CreateDocument(); Assert.NotNull(doc1); Assert.NotNull(doc2); Assert.NotSame(doc1, doc2); }
public XmlDocument(XmlNameTable nt) : base(null) { if (nt != null) { implementation = new XmlImplementation(nt); } else { implementation = new XmlImplementation(); } Initialize(); }
protected internal XmlDocument(XmlImplementation imp) : base(null) { if (imp != null) { implementation = imp; } else { implementation = new XmlImplementation(); } Initialize(); }
public XmlDocument(XmlNameTable nt) : base(null) { if(nt != null) { implementation = new XmlImplementation(nt); } else { implementation = new XmlImplementation(); } Initialize(); }
protected internal XmlDocument(XmlImplementation imp) : base(null) { if(imp != null) { implementation = imp; } else { implementation = new XmlImplementation(); } Initialize(); }
XmlDocument(XmlImplementation impl, XmlNameTable nt) : base(null) { if (impl == null) { implementation = new XmlImplementation(); } else { implementation = impl; } nameTable = (nt != null) ? nt : implementation.InternalNameTable; nameCache = new XmlNameEntryCache(nameTable); AddDefaultNameTableKeys(); resolver = new XmlUrlResolver(); }
XmlDocument(XmlImplementation impl, XmlNameTable nt) : base(null) { if (impl == null) { implementation = new XmlImplementation(); } else { implementation = impl; } nameTable = (nt != null) ? nt : implementation.InternalNameTable; nameCache = new XmlNameEntryCache(nameTable); AddDefaultNameTableKeys(); resolver = new XmlUrlResolver(); Type type = GetType(); optimal_create_element = type.GetMethod("CreateElement", optimal_create_types).DeclaringType == typeof(XmlDocument); optimal_create_attribute = type.GetMethod("CreateAttribute", optimal_create_types).DeclaringType == typeof(XmlDocument); }
protected internal XmlDocument(XmlImplementation imp) : this(imp, null) { }
public static void HasFeatureReturnsFalseForUnsupportedVersion() { var target = new XmlImplementation(); Assert.False(target.HasFeature(SupportedFeature, "1.2")); }
internal XmlDataDocument(XmlImplementation imp) : base(imp) { }
public DOMImplementation() : base(ScriptContext.CurrentContext, true) { XmlImplementation = new XmlImplementation(); }
// Constructors. public XmlDocument() : base(null) { implementation = new XmlImplementation(); Initialize(); }
public static void HasFeatureReturnsFalseForUnsupportedFeature() { var target = new XmlImplementation(); Assert.False(target.HasFeature("Unsupported", null)); }
/// <summary> /// Initializes a new instance of the SafeXmlDocument class with the specified XmlImplementation. /// </summary> /// <remarks>Not supported do to no use within exchange dev code.</remarks> /// <param name="imp">The XmlImplementation to use.</param> public SafeXmlDocument(XmlImplementation imp) { throw new NotSupportedException("Not supported"); }
protected internal XmlDocument (XmlImplementation imp) : this (imp, null) { }
XmlDocument (XmlImplementation impl, XmlNameTable nt) : base (null) { if (impl == null) implementation = new XmlImplementation (); else implementation = impl; nameTable = (nt != null) ? nt : implementation.InternalNameTable; nameCache = new XmlNameEntryCache (nameTable); AddDefaultNameTableKeys (); resolver = new XmlUrlResolver (); Type type = GetType (); optimal_create_element = type.GetMethod ("CreateElement", optimal_create_types).DeclaringType == typeof (XmlDocument); optimal_create_attribute = type.GetMethod ("CreateAttribute", optimal_create_types).DeclaringType == typeof (XmlDocument); }
/// <include file='doc\XmlDocument.uex' path='docs/doc[@for="XmlDocument.XmlDocument2"]/*' /> protected internal XmlDocument( XmlImplementation imp ): base() { this.implementation = imp; idTable = new XmlIdentityTable( this ); // force the following string instances to be default in the nametable XmlNameTable nt = this.NameTable; nt.Add( string.Empty ); nt.Add( strDocumentName ); nt.Add( strDocumentFragmentName ); nt.Add( strCommentName ); nt.Add( strTextName ); nt.Add( strCDataSectionName ); nt.Add( strEntityName ); nt.Add( strID ); nt.Add( strNonSignificantWhitespaceName ); nt.Add( strSignificantWhitespaceName ); nt.Add( strXmlns ); nt.Add( strXml ); nt.Add( strSpace ); nt.Add( strLang ); nt.Add( strReservedXmlns ); nt.Add( strEmpty ); nullNode = new XmlDocumentFragment( this ); eleIds = new XmlElementIdMap(this); loader = new XmlLoader(); _schemaInfo = null; isLoading = false; fEntRefNodesPresent = false; fIsEdited = false; fCDataNodesPresent = false; bSetResolver = false; resolver = null; this.objLock = new object(); }