日志对象树
在 Word 文档构建过程中记录对象树,可以为开发人员提供重要的调试见解和验证工具,使他们能够快速识别和纠正文档结构中的错误或不一致之处。 通过分析对象树,可以帮助开发人员识别和解决构建过程中的低效问题,从而有助于性能优化。 总而言之,记录对象树可以简化开发流程,确保高效创建高质量的 Word 文档。
准备开始了吗?
Nuget 下载 28,054 | 版本: 2025.12 刚刚发布
using IronWord;
using IronWord.Models;
using System.Linq;
WordDocument docx = new WordDocument("Table.docx");
// Log object tree of the whole document
docx.LogObjectTree();
// Log object tree of table 0
docx.Children.OfType<Table>().First().LogObjectTree();Imports IronWord
Imports IronWord.Models
Imports System.Linq
Private docx As New WordDocument("Table.docx")
' Log object tree of the whole document
docx.LogObjectTree()
' Log object tree of table 0
docx.Children.OfType(Of Table)().First().LogObjectTree()Install-Package IronWord
在 Word 文档构建过程中记录对象树,可以为开发人员提供重要的调试见解和验证工具,使他们能够快速识别和纠正文档结构中的错误或不一致之处。 通过分析对象树,可以帮助开发人员识别和解决构建过程中的低效问题,从而有助于性能优化。 总而言之,记录对象树可以简化开发流程,确保高效创建高质量的 Word 文档。