#Eggnog
A fast XML and JSON parser.
gem install eggnog
Easily parse the following XML:
xml =<<DOC
<?xml version="1.0"?>
<foo>
<bar baz="boo">Some text value</foo>
</foo>
DOC
like this:
Eggnog::XML.parse(xml)
which returns:
{
"foo" => {
"bar" => "Some text value"
}
}
Preserve XML attributes:
Eggnog::XML.parse(xml, :preserve_attributes => true)
returns:
{
"foo" => {
"bar" => {
"__content__" => "Some text value",
"baz" => "boo"
}
}
}
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request