
# 2009-03-14 katoy

require 'rubygems'
require 'xml/libxml'
require 'pp'
require 'benchmark'

if $0 == __FILE__

  # xml = '../data/xbrl.xbrl'
  # xml = '../data/msft/msft-20080930.xml'
  xml = "../data/td-net/081220090203088072/tdnet-qcedjpfr-33500-2008-11-30-01-2009-02-20.xbrl"
  # xml = 'http://www.sec.gov/Archives/edgar/data/789019/000119312508215214/msft-20080930.xml'
  # xml = "http://www.sec.gov/Archives/edgar/data/796343/000079634308000007/adbe-20080916.xml"  

  # xml = ARGV[0]

  puts Benchmark.measure {
    begin
      doc = XML::Document.file(xml)
      puts doc.to_s

    rescue
      puts "---- error reading #{xml}"
      return self
    end
  }

end
