Lea los archivos XBRL y iXBRL en Python
Contents
[
Hide
]
Lea el archivo de instancia XBRL en Python
Aspose.Finance admite la lectura de documentos XBRL. Para esto, puede usar la clase XbrlDocument pasando el nombre de un archivo de instancia XBRL válido como parámetro.
El siguiente fragmento de código Python muestra la lectura de un documento de instancia XBRL.
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
document = XbrlDocument(os.path.join(sourceDir, "IdScopeContextPeriodStartAfterEnd.xml")) | |
xbrlInstances = document.xbrl_instances | |
xbrlInstance = xbrlInstances[0] | |
facts = xbrlInstance.facts | |
schemaRefs = xbrlInstance.schema_refs | |
contexts = xbrlInstance.contexts | |
units = xbrlInstance.units |
Lea el archivo iXBRL en Python
Aspose.Finance admite la lectura de documentos de instancia iXBRL. Para ello, el API proporciona la clase InlineXbrlDocument. El constructor de la clase InlineXbrlDocument acepta el nombre de un archivo iXBRL válido.
El siguiente fragmento de código Python muestra la lectura de un documento de instancia 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
document = InlineXbrlDocument(iXbrlFilePath + @"account_first.html") | |
inlineFacts = document.facts | |
contexts = document.contexts | |
units = document.units |