XBRL

Perl extension for Reading Extensible Business Reporting Language documents
Download

XBRL Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Mark Gannon
  • Publisher web site:
  • http://www.polyspool.org/

XBRL Tags


XBRL Description

XBRL is a Perl module that provides an OO interface for reading Extensible Business Reporting Language documents (XBRL docs).new $xbrl_doc = XBRL->new ( { file="foo.xml", schema_dir="/var/cache/xbrl" } ); file -- This option specifies the main XBRL doc instance. schema_dir -- allows the caller to specify a directory for storing ancillary schemas required by the instance. Specifying this directory means those schemas won't have to be downloaded each time an XBRL doc is parsed. If no schema_dir is specified, the module will create a temporary directory to store any needed schemas and delete it when the module goes out of scope.get_html_report Processes the XBRL doc into an HTML document. $html = $xbrl_doc->get_html_report({ css_file => 'style.css'} ) The optional css_file allows an external CSS stylesheet to be included in the report for controlling the presentation of the report. $html = $xbrl_doc->get_html_report({ css_block => $CSS } ) The optional css_block parameter takes a string of CSS instructions and includes them in the reports header section. If neither option is specified, a default CSS style is included in the header of the report.get_item_by_contexts my $items = $xbrl_doc->get_item_by_contexts($context_id); Return an array reference of XBRL::Items which share the same context.get_item_all_contexts my $revenue_items = $xbrl_doc->get_item_all_contexts("us-gaap:Revenues"); Takes an item name and returns an array reference of all other items with the same name.get_all_items my $all_items = $xbrl_doc->get_all_items(); Returns an array reference to the list of all items.get_item my $item = $xbrl_doc->get_item($item_name, $context_id) Returns an item identified by the its name and context. Undef if no item of that description exists.get_unit my $unit = $xbrl_doc->get_unit($unit_id); Returns unit identified by its id.get_all_contexts my $contexts = $xbrl_doc->get_all_contexts(); Returns a hash reference where the keys are the context ids and the values are XBRL::Context objects.get_context my $context = $xbrl_doc->get_contexts($id); Returns an XBRL::Context object based on the ID passed into the function.get_taxonomy my $taxonomy = $xbrl_doc->get_taxonomy(); Returns an XBRL::Taxonomy instance based on the XBRL document.SYNOPSISuse XBRL;my $xbrl_doc = XBRL->new( {file=>"foo.xml", schema_dir="/var/cache/xbrl"});my $html_report = $doc->get_html_report();Product's homepage


XBRL Related Software