在 Python 中将 XBRL 转换为 iXBRL
Contents
[
Hide
]
Aspose.Finance 支持通过传递一个实例将 XBRL 文件转换为 IXBRL保存选项类到XbrlDocument.save方法。要将文档保存为 IXBRL 格式,请设置保存选项.save_format至保存格式.IXBRL.
以下 C# 代码片段演示了如何将 XBRL 转换为 IXBRL 格式。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Enable cache service, this service will cache schema and link base file, and use the local file directly in the next load | |
LocalCacheService.enable_service("D:\\xbrl\\cache") | |
document = XbrlDocument(sourcePath + "Id-Scope-Context-Period-Start-After-End.xml") | |
# Set save options | |
Opts = SaveOptions() | |
Opts.save_format = SaveFormat.IXBRL | |
# Save file to iXBRL format | |
document.save(outputPath + "Converted-Xbrl-To-IXBRL_out.ixbrl", Opts) |