* passing product class as the second argument is now deprecated * the second argument to ONIX::Reader is now an optional options Hash * the product class should now be specified using the :product_class option * this change was motivated by the need for an :encoding option
* much easier to just tell Nokogiri::XML::Reader what encoding the source is instead of rewriting the entire file
* lots of input files mess up their encoding declarations by * leaving the XML declaration off entirely * adding an XML declaration that doesn't specify an encoding * adding an XML declaration that spcifies the wrong encoding * This gem uses Nokogiri to read XML files. It always transcodes input files to UTF-8, but it needs an accurate encoding indicator to function correctly. Without the encoding indicator, it assumes the file is UTF-8
…ifier' should be 'PriceQualifier'
* closes #1 * reported by pixelvixen * to quote the report: "You will want to set the unlink_now option to true when you close the tempfile. The way it is right now, the file can actually be unlinked *after* you copy the old file to that location."
- This library only handles ONIX 2.1 at this stage, so hard code that in
- don't bother with encoding stage, Nokogiri will transparently convert the source document to utf-8 - don't bother with entity stage, Nokogiri will transparently translate the named entities by first loading the DTD
- transparently converts entities into appropriate characters - loads the DTD into memory from the doctype URL, which requires net access - downloading the DTD slows things down, but at least we avoid an exception - thanks to Aaron Paterson for showing how to achieve this at http://gist.github.com/250477