Created
October 25, 2022 19:17
-
-
Save aspose-finance-gists/00331a81b22c710620e189f929fbcd30 to your computer and use it in GitHub Desktop.
Revisions
-
aspose-finance-gists created this gist
Oct 25, 2022 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ Learn **how to validate an XBRL document in Python** : https://blog.aspose.com/finance/validate-xbrl-document-in-python/ The following topics are covered in this article: 1. [Python XBRL Validator API to Validate XBRL Document](https://blog.aspose.com/finance/validate-xbrl-document-in-python/#Python-XBRL-Validator-API-to-Validate-XBRL-Documents) 2. [Validate XBRL File](https://blog.aspose.com/finance/validate-xbrl-document-in-python/#Validate-XBRL-File-in-Python) 3. [Validate Inline XBRL File](https://blog.aspose.com/finance/validate-xbrl-document-in-python/#Validate-iXBRL-File-in-Python) 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ # This code example demonstrates how to validate Inline XBRL document. from aspose.finance.xbrl.inline import InlineXbrlDocument # The path to the input document inputFile = "C:\Files\sample.html" # Load XBRL file document = InlineXbrlDocument(inputFile) # Validate document.validate(); # Show validation errors if any if document.validation_errors.length > 0: for validationError in document.validation_errors: print(validationError.message) 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ # This code example demonstrates how to validate XBRL instance document. from aspose.finance.xbrl import XbrlDocument # The path to the input document inputFile = "C:\Files\sample.xbrl" # Load XBRL file document = XbrlDocument(inputFile) # Get instances xbrlInstances = document.xbrl_instances # Select specific instance xbrlInstance = xbrlInstances[0] # Validate xbrlInstance.validate() # Show validation errors if any if xbrlInstance.validation_errors.length > 0: for validationError in xbrlInstance.validation_errors: print(validationError.message)