【发布时间】:2022-01-22 20:32:25
【问题描述】:
我来找你是因为作为项目的一部分,我必须尽可能使用 Aspose.Word 和 .NET 将参考书目添加到 Word 文档中。
我真的不知道该怎么做,因为文档非常稀少,而且网上几乎没有帮助。因此,我把它留给你问你如何到达那里。
这是我的实际代码:
CustomXmlPart xmlPart = document.CustomXmlParts.Add("Books",
"<books>" +
"<book>" +
"<title>Everyday Italian</title>" +
"<author>Giada De Laurentiis</author>" +
"</book>" +
"<book>" +
"<title>The C Programming Language</title>" +
"<author>Brian W. Kernighan, Dennis M. Ritchie</author>" +
"</book>" +
"<book>" +
"<title>Learning XML</title>" +
"<author>Erik T. Ray</author>" +
"</book>" +
"</books>");
StructuredDocumentTag sdtBiblio = new StructuredDocumentTag(document, SdtType.Bibliography, MarkupLevel.Row);
sdtBiblio.XmlMapping.SetMapping(xmlPart, "/books[1]/book", string.Empty);
【问题讨论】:
标签: c# .net aspose.words bibliography