public CXmlDocumentSerializationParameters(CISinkSerializationParameters aCopy, CXmlDocumentRoot aDocument, StringBuilder aBuilder)
            : base(aCopy)
        {
            PrepareDefaultExtensions();
            iDocument = aDocument;
            //
            XmlWriterSettings settings = CreateWriterSettings();

            settings.ConformanceLevel   = ConformanceLevel.Fragment;
            settings.OmitXmlDeclaration = true;
            //
            iWriter   = XmlWriter.Create(aBuilder, settings);
            iFileName = string.Empty;
        }
        public CXmlDocumentSerializationParameters(CISinkSerializationParameters aCopy, CXmlDocumentRoot aDocument)
            : base(aCopy)
        {
            PrepareDefaultExtensions();
            iDocument = aDocument;
            //
            Stream stream = base.CreateFile(out iFileName);
            //
            XmlWriterSettings settings = CreateWriterSettings();

            settings.CloseOutput = true;
            //
            iWriter = XmlWriter.Create(stream, settings);
        }