Git Product home page Git Product logo

xommelier's Introduction

Xommelier is an XML Sommelier

Overview

Xommelier is an XML Object Mapper. You could describe some namespace (e.g. Atom) in ruby DSL and use it for parsing XML to Ruby objects or for building XML from Ruby objects.

Look into {Xommelier::Atom}, {Xommelier::Atom::Threading}, and {Xommelier::Atom::History} module for implementation of http://www.w3.org/2005/Atom namespace, Atom Threading, and Feed Paging and Archiving extensions

Project links

Examples

See examples dir for examples of:

  • reading an Atom feed;
  • building an Atom feed;
  • building an Atom feed from hash;

Built in XML namespaces:

  1. {Xommelier::Atom} - http://www.w3.org/2005/Atom
  2. {Xommelier::Atom::Threading} - http://purl.org/syndication/thread/1.0
  3. {Xommelier::Atom::History} - http://purl.org/syndication/history/1.0
  4. {Xommelier::OpenSearch} - http://a9.com/-/spec/opensearch/1.1/

TODO

  • Rebuild on top of ROM
  • Validating built XML against RelaxNG
  • Converting XML Schema, RelaxNG, RelaxNG Compact and DTD into Xommelier Ruby DSL
  • ActiveRecord-like automatic loading of XML Schema, RelaxNG, RelaxNG Compact and DTD without needing to write it down into ruby code

Contributors

© Alex Semyonov, 2011-2017. See LICENSE for details

Bitdeli Badge

xommelier's People

Contributors

alsemyonov avatar artps avatar bitdeli-chef avatar ukstv avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

xommelier's Issues

Xommelier documentation

YARD documentation for methods, options. Especially Xommelier::Xml::Element needs to be documented

License missing from gemspec

Some companies will only use gems with a certain license.
The canonical and easy way to check is via the gemspec
via e.g.

spec.license = 'MIT'
# or
spec.licenses = ['MIT', 'GPL-2']

Bundler now generates gems with a default 'MIT' license. There is even a License Finder
to help companies ensure all gems they use meet their licensing needs. This tool depends on license information being available in the gemspec.
Including a license in your gemspec is a good practice, in any case.

If you need help choosing a license, github has created a license picker tool

How did I find you?

I'm using a script to collect stats on gems, originally looking for download data, but decided to collect licenses too,
and make issues for gemspecs not specifying a license as a public service :)
So far it's going pretty well.
I've written a blog post about it

«as» option for attributes

    class Element < Xml::Element
      element_name 'xmlElement'

      attribute :schema_location, as: :schemaLocation, ns: XSI.xmlns
    end

xmlns for attributes

    module Xommelier
      module XSI
        include Xommelier::Xml
        xmlns 'http://www.w3.org/2001/XMLSchema-instance', as: :xsi
      end
    end

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.