Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
useful class for matching xml documents based on a subset of nodes
Ruby
tree: f5ed2f4665

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
MIT-LICENSE
README
xml_subset_matcher.gemspec

README

In progress: I've used this library inside of Rails (see cucumber_xml project) but I'm tyring to learn how to make it a stand-alone gem that can be used independently from Rails.
gem build xml_subset_matcher.gemspec
sudo gem install xml_subset_matcher

master $ irb
>> require 'xml_subset_matcher'
=> true
>> subset = "<root><thing>text</thing></root>"
=> "<root><thing>text</thing></root>"
>> superset = "<root extra='stuff'><ignorethis/><thing>text</thing></root>"
=> "<root extra='stuff'><ignorethis/><thing>text</thing></root>"
>> x = XmlSubsetMatcher::XmlSubsetMatcher.new(superset)
NameError: uninitialized constant Nokogiri::XML::PARSE_RECOVER
	from /Library/Ruby/Gems/1.8/gems/xml_subset_matcher-0.0.4/lib/xml_subset_matcher.rb:8:in `initialize'
	from (irb):2:in `new'
	from (irb):2

weird... I changed the library to require Nokogiri, but that didn't seem to help
Something went wrong with that request. Please try again.