Search code examples
xmldatabasexbrl

XML XBRL _ Can we use a freeware XML parser (BaseX) to parse XBRL data since XBRL is XML-based?


It all boils down to a very critical question on parsing XML data!

  • Can we parse XBRL (which is XML-based) to extract data from a database?

The reason i am submitting this theoretical question (which requires technical capacity on XML) is that software houses are putting a separate price tag (please check that previous link) between XML parsers and XBRL parsers! That definitely raises a red flag.

  • Can we use a freeware like BaseX which is designed to query XML to parse an XBRL Instance document and extract data. If not why since XBRL is XML?

Solution

  • All XBRL is XML, so, at a base level, yes, you can.

    However, XBRL imposes additional semantics and validations on top of XML specific to the XBRL spec. Therefore, valid XML is not necessarily valid XBRL. Vendors are putting a separate price tag on XBRL because of the semantic and validity rules imposed by the XBRL spec. Valid XBRL is also valid XML, but valid XML is not necessarily valid XBRL.