Example #1
0
        protected internal override void Commit()
        {
            /*XmlOptions xmlOptions = new XmlOptions(DEFAULT_XML_OPTIONS);
             * xmlOptions.SaveSyntheticDocumentElement=(new QName(CTFootnotes.type.Name.NamespaceURI, "footnotes"));
             * Dictionary<String,String> map = new Dictionary<String,String>();
             * map.Put("http://schemas.Openxmlformats.org/officeDocument/2006/relationships", "r");
             * map.Put("http://schemas.Openxmlformats.org/wordProcessingml/2006/main", "w");
             * xmlOptions.SaveSuggestedPrefixes=(map);*/
            PackagePart part = GetPackagePart();

            using (Stream out1 = part.GetOutputStream())
            {
                FootnotesDocument notesDoc = new FootnotesDocument(ctFootnotes);
                notesDoc.Save(out1);
            }
        }
Example #2
0
        protected override void Commit()
        {
            /*XmlOptions xmlOptions = new XmlOptions(DEFAULT_XML_OPTIONS);
             * xmlOptions.SaveSyntheticDocumentElement=(new QName(CTFootnotes.type.Name.NamespaceURI, "footnotes"));
             * Dictionary<String,String> map = new Dictionary<String,String>();
             * map.Put("http://schemas.Openxmlformats.org/officeDocument/2006/relationships", "r");
             * map.Put("http://schemas.Openxmlformats.org/wordProcessingml/2006/main", "w");
             * xmlOptions.SaveSuggestedPrefixes=(map);*/
            PackagePart             part       = GetPackagePart();
            Stream                  out1       = part.GetOutputStream();
            XmlSerializerNamespaces namespaces = new XmlSerializerNamespaces(new XmlQualifiedName[] {
                new XmlQualifiedName("w", "http://schemas.Openxmlformats.org/wordProcessingml/2006/main"),
                new XmlQualifiedName("r", "http://schemas.Openxmlformats.org/officeDocument/2006/relationships")
            });
            FootnotesDocument notesDoc = new FootnotesDocument(ctFootnotes);

            notesDoc.Save(out1, null);
            out1.Close();
        }