Read XBRL and iXBRL files in C#
Contents
[
Hide
]
Read XBRL instance file in C#
Aspose.Finance supports reading XBRL documents. For this, you can use the XbrlDocument class by passing the name of a valid XBRL instance file as a parameter.
The following C# code snippet demonstrates reading an XBRL instance document.
This file contains hidden or 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
XbrlDocument document = new XbrlDocument(XbrlFilePath + @"IdScopeContextPeriodStartAfterEnd.xml"); | |
XbrlInstanceCollection xbrlInstances = document.XbrlInstances; | |
XbrlInstance xbrlInstance = xbrlInstances[0]; | |
List<Fact> facts = xbrlInstance.Facts; | |
SchemaRefCollection schemaRefs = xbrlInstance.SchemaRefs; | |
List<Context> contexts = xbrlInstance.Contexts; | |
List<Unit> units = xbrlInstance.Units; |
Read iXBRL file in C#
Aspose.Finance supports reading iXBRL instance documents. For this, the API provides the InlineXbrlDocument class. The constructor of the InlineXbrlDocument class accepts the name of a valid iXBRL file.
The following C# code snippet demonstrates reading an iXBRL instance document.
This file contains hidden or 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
InlineXbrlDocument document = new InlineXbrlDocument(XbrlFilePath + @"account_1.html"); | |
List<InlineFact> inlineFacts = document.Facts; | |
List<Context> contexts = document.Contexts; | |
List<Unit> units = document.Units; |