I have started exploring Arelle for XBRL parsing. I am calling Arelle's webservice Api through java to get the various views/outputs it can generate like facts, factTable, pre etc.
In the final output that I want I need all fields from facts file and few details from the pre file. I have written my Java code to do this, but I am stuck because I have no idea how to navigate from facts to pre. How can I combine these outputs? How are these views related, on what attributes ?
Facts are related to presentation by means of the concept name (QName from an XML perspective, SQName from an Open Information Model perspective), like
us-gaap:Assets.The
factsendpoint is a flat list of facts each having a concept name, while thepreendpoint organizes concepts, identified by their names, in a hierarchy.The following drawing illustrates this mapping using csv as output. In JSON, for both facts and pre, the concept names are in a
namefield. In XML, they are in anameattribute. With Java, this requires parsing XML or JSON to build the appropriate objects and take it from there.(This example was taken from this SEC filing)