Beispiel #1
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();
        }
Beispiel #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();
        }
 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();
 }