view · edit · sidebar · attach · print · history

20120912-update-oddb2xml-build-xml

<< | Index | >>


Summary

  • build xml from parsed BAG XML and swissINDEX

Commits

Index


nokogiri in threads

Sometimes crash or return various errors.

/path/to/gems/ruby/1.9.1/gems/nokogiri-1.5.5/lib/nokogiri/xml/xpath_context.rb:8:in `register_namespaces': undefined method `each' for nil:NilClass (NoMethodError)
/path/to/gems/ruby/1.9.1/gems/nokogiri-1.5.5/lib/nokogiri/xml/node.rb:148: [BUG] Segmentation fault
...
/home/yasuhiro/Documents/workspace/ywesee/var/oddb2xml/lib/oddb2xml/cli.rb:35:in `block (2 levels) in run'
/home/yasuhiro/Documents/workspace/ywesee/var/oddb2xml/lib/oddb2xml/extractor.rb:61:in `to_hash'
/home/yasuhiro/Documents/workspace/ywesee/var/oddb2xml/lib/oddb2xml/extractor.rb:61:in `each'
/home/yasuhiro/Documents/workspace/ywesee/var/oddb2xml/lib/oddb2xml/extractor.rb:69:in `block in to_hash'
/path/to/gems/ruby/1.9.1/gems/nokogiri-1.5.5/lib/nokogiri/xml/node.rb:239:in `at_xpath'
/path/to/gems/ruby/1.9.1/gems/nokogiri-1.5.5/lib/nokogiri/xml/node.rb:148:in `xpath'
/path/to/gems/ruby/1.9.1/gems/nokogiri-1.5.5/lib/nokogiri/xml/node_set.rb:246:in `join': method `to_str' called on unexpected T_NODE object (0x0000001d5c3df8 flags=0x621c klass=0x0) (NotImplementedError)
/path/to/gems/ruby/1.9.1/gems/nokogiri-1.5.5/lib/nokogiri/xml/node.rb:150:in `xpath': undefined method `map' for #<RubyVM::Env:0x000000088e32a0> (NoMethodError)
/path/to/gems/ruby/1.9.1/gems/nokogiri-1.5.5/lib/nokogiri/xml/node.rb:150:in `xpath': undefined method `map' for "7601001001121":String (NoMethodError)

Is problem of File access for debug ? suspend.


Updated parsed data.

Updated parsed data __pharmacode__ of Package as key.

  • Preparations is composed by *registrations*.
  • Swissindex is composed by *packages*
1. extract data from Preparations.xml
:pharmacode => registrations

1. extract data from swissINDEX.xml
:pharmacode => packages

Created xml builder

Created output XML builder.

  • oddb_product.xml
  • oddb_article.xml
commit
view · edit · sidebar · attach · print · history
Page last modified on September 12, 2012, at 12:11 PM