ronin78 has asked for the wisdom of the Perl Monks concerning the following question:

Hi everyone,

Is there a Perl library for handling XBRL information? There are plenty of options for straight XML, but I have not been able to find anything for XBRL.

If there isn't an explicit package, has anyone out there modified the XML functionality to deal with the extra "stuff" in XBRL (like taxonomy management)? If it is feasible, I will continue to pursue using Perl for XBRL

Regards,

Matt

Replies are listed 'Best First'.
Re: XBRL in Perl
by dHarry (Abbot) on Jun 02, 2011 at 08:54 UTC

    Is there a Perl library for handling XBRL information

    I don't think so. I know of no existing Perl solution for this. Of course it is XML and any validating parser (with full support for XML Schema) can be used. However, XML Schema validation is only a part of the story, you do need additional software. I recommend taking a look at XBRL tools. In general www.xml.com is also a place to check.

    Cheers

    Harry

    PS Beware of the XBRL learning curve it's not really simple.

Re: XBRL in Perl
by Khen1950fx (Canon) on Jun 02, 2011 at 09:16 UTC
    First, XBRL is XML. See:XBRL most certainly does use XML Schema - and then some:.

    As for taxonomy management, I couldn't find an explicit package, and the reason seems to be interoperability---between, on the one hand, differing taxonomies and differing vendors---and, on the other hand, differing methods of dealing with whitespace and with numbers for validation by XML Schema---However, the specification is clearly defined, and XBRL is absolutely necessary for the financial system to work properly, so I was surprised that there aren't any modules that can, for example, manage a taxonomy.

    See: BestPractices for more info.

Re: XBRL in Perl
by Jenda (Abbot) on Jun 05, 2011 at 00:40 UTC

    So I've looked it up and all I can say is .. good luck! If XBRL is as overcomplicated and misapplied as HR-XML you will need a lot of luck and a few chicken to sacrifice along the way. And a good durable punch bag.

    Jenda
    Enoch was right!
    Enjoy the last years of Rome.

      Thanks Jenda. At least I am an accountant, so the underlying data should, in theory, make sense.

      If I end up learning something valuable, maybe I'll see how hard it would be to produce some Perl functions.

Re: XBRL in Perl
by ronin78 (Novice) on Jun 02, 2011 at 19:58 UTC

    Thanks for the guidance, guys. It looks like you are largely running into the same problem I am, which is that there is plenty for XML, not so much for XBRL.

    In case anyone else on the Board is interested in this, there is the XBRLAPI for programming with and accessing XBRL data and taxonomies. I just love Perl, and don't know Java, so I was hoping I wouldn't have to go that route.

    Thanks anyway. I'll be off buying a Beginner Java book.

    Regards,

    Matt


    P.S. Harry, thanks for the warning. I am discovering that XBRL is not a walk in the park.

Re: XBRL in Perl
by Notdeadyet (Initiate) on Mar 28, 2012 at 17:35 UTC
    I've just released to CPAN the first version of a module to parse XBRL. While it is still immature interms of functionality, my plan is to accrete functionality in subsequent versions until it is standards compliant and fully functional. At the moment it can parse the document and make the components (e.g. items, contexts, elements, linkbases) available as well as generate a very, very basic HTML version. The module is available here and the project is hosted on Github here.
Re: XBRL in Perl
by Anonymous Monk on Jun 01, 2011 at 19:28 UTC
    The supposed beauty of XML, is that its XML, so you don't need special codebase to deal with it
      There is more to using data than just parsing it.