soulcutter / saxerator

A SAX-based XML parser for parsing large files into manageable chunks
MIT License
128 stars 19 forks source link

First scratch of rexml implementation #46

Closed fanantoxa closed 7 years ago

fanantoxa commented 8 years ago

Related to task: Update XmlBuilder to use REXML class

@soulcutter Please take a look here. That is the first scratch but tests works good. Also I've turned on xml output_type for Ox too.

fanantoxa commented 8 years ago

@soulcutter I've update a bit the code. Please check it)

fanantoxa commented 8 years ago

@soulcutter Also question about output. REXML convert — to (long dash). Is it ok or I have to check how to save — on output string?

fanantoxa commented 8 years ago

@soulcutter I've removed out_put type restrictions for different parsers.

soulcutter commented 7 years ago

REXML convert — to — (long dash). Is it ok or I have to check how to save — on output string?

I'm fine with keeping with REXML's behavior for that output.

fanantoxa commented 7 years ago

@soulcutter I've updated with your additions, But for some reason test fails on ruby 2.0 with error:

An error occurred while installing nokogiri (1.7.0.1), and Bundler cannot
continue.
Make sure that `gem install nokogiri -v '1.7.0.1'` succeeds before bundling.
The command "eval bundle install --without coverage --binstubs --path=${BUNDLE_PATH:-vendor/bundle}" failed. Retrying, 2 of 3.
fanantoxa commented 7 years ago

@soulcutter Also look like test doesn't works properly because the not test when we changing adapter actually. It's stubbed. So when I've tried to use it on app if failed because wasn't able to find adapter to require.

soulcutter commented 7 years ago

The latest nokogiri requires ruby 2.1.0+

soulcutter commented 7 years ago

So when I've tried to use it on app if failed because wasn't able to find adapter to require.

It should fail in that scenario. You have to have the adapter on the load path if you want to use it. That could be worth clarifying in the documentation. Adapters are external dependencies, not bundled with this library.