本文整理汇总了C#中Aspose.Words.Document.ImportNode方法的典型用法代码示例。如果您正苦于以下问题:C# Document.ImportNode方法的具体用法?C# Document.ImportNode怎么用?C# Document.ImportNode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Aspose.Words.Document
的用法示例。
在下文中一共展示了Document.ImportNode方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SectionsImportSection
public void SectionsImportSection()
{
//ExStart
//ExId:SectionsImportSection
//ExSummary:Shows how to copy sections between documents.
Aspose.Words.Document srcDoc = new Aspose.Words.Document(ExDir + "Document.doc");
Aspose.Words.Document dstDoc = new Aspose.Words.Document();
Aspose.Words.Section sourceSection = srcDoc.Sections[0];
Aspose.Words.Section newSection = (Aspose.Words.Section)dstDoc.ImportNode(sourceSection, true);
dstDoc.Sections.Add(newSection);
//ExEnd
}
示例2: MigrateFrom2XImportSection
public void MigrateFrom2XImportSection()
{
Aspose.Words.Document srcDoc = new Aspose.Words.Document();
Aspose.Words.Document dstDoc = new Aspose.Words.Document();
//ExStart
//ExId:MigrateFrom2XImportSection
//ExSummary:This fragment shows how to insert a section from another document in Aspose.Words 3.0 or higher.
Aspose.Words.Section sourceSection = srcDoc.Sections[0];
Aspose.Words.Section newSection = (Aspose.Words.Section)dstDoc.ImportNode(sourceSection, true);
dstDoc.Sections.Add(newSection);
//ExEnd
}