Пример #1
0
 protected override void Build()
 {
     xmlDocument = new XmlDocument();
     XmlBuilder.XmlBuilder document = xmlDocument.CreateXmlBuilder("ncx", new Dictionary <string, string>
     {
         { "xmlns", Resources.NcxNs },
         { "version", Resources.NcxVersion }
     });
     document.AppendElement(BuildHeadSection());
     document.AppendElement(BuildDocTitleSection());
     document.AppendElement(BuildNavMapSection());
     xmlDocument = document.GetDocument();
 }
Пример #2
0
 protected override void Build()
 {
     contentItems = new List <string>();
     xmlDocument  = new XmlDocument();
     XmlBuilder.XmlBuilder document = xmlDocument.CreateXmlBuilder("package", new Dictionary <string, string>
     {
         { "xmlns", Resources.OpfPackageNs },
         { "version", "2.0" },
         { "unique-identifier", Resources.OpfIdentifierField }
     });
     document.AppendElement(BuildMetadataSection());
     document.AppendElement(BuildManifestSection());
     document.AppendElement(BuildSpineSection());
     xmlDocument = document.GetDocument();
 }
Пример #3
0
        protected void GenerateContainerFile()
        {
            XmlDocument xmlDocument = new XmlDocument();

            XmlBuilder.XmlBuilder document = xmlDocument.CreateXmlBuilder("container", new Dictionary <string, string>
            {
                { "xmlns", Resources.ContainerNs },
                { "version", "1.0" }
            });

            document
            .AppendElement(xmlDocument.CreateXmlElement("rootfiles")
                           .AppendElement(xmlDocument.CreateXmlElement("rootfile",
                                                                       new Dictionary <string, string>
            {
                { "full-path", Structure.Files.OpfFileFullPath },
                { "media-type", Resources.ContainerMediaType }
            })));
            file.AddEntry(Structure.Files.ContainerFileFullPath, document.GetDocument().OuterXml);
        }