Possible to parse XBRL from string? #105
Replies: 2 comments
-
Hmm, that's probably a good suggestion however not that easy to implement. Here is an actual example: Let's say you store the latest iXBRL submission from Apple Inc as a string into a database and want to parse it via py-xbrl. <link:schemaref xlink:type="simple" xlink:href="./aapl-20220924.xsd"></link:schemaref> But how should py-xbrl know where to download the file 'aapl-20220924.xsd' ? But yes, with UK submission it would theoretically be perfectly possible to parse them from string because they just consist of one file. |
Beta Was this translation helpful? Give feedback.
-
That makes sense, and I can see it certainly poses issues for the general case. I have a couple modifications to the taxonomy (I found the UK pre-2010 taxonomy is identical to the 2010 one, but has a different name) which I will submit as a pull request, but then I will create a custom fork for what I need my specific version to do. I can probably unpick the XBRL reader and implement my own. If you have any suggestions on how best to do this (try to get it to read a string directly instead of loading from file, or try to convert to an XML object in mem and then try to get it to read) I would appreciate the advice! |
Beta Was this translation helpful? Give feedback.
-
I have a database containing many iXBRL instances in string format. With the current code, is it possible to parse those strings directly into the reader instead of having to save them to an HTML file on disk and then have the reader load them back in?
Beta Was this translation helpful? Give feedback.
All reactions