README.md in sax-machine-1.0.2 vs README.md in sax-machine-1.0.3

- old
+ new

@@ -135,9 +135,29 @@ c.element :title end end ``` +Multiple elements can be mapped to the same alias: + +```ruby +class RSSEntry + include SAXMachine + # ... + element :pubDate, as: :published + element :pubdate, as: :published + element :"dc:date", as: :published + element :"dc:Date", as: :published + element :"dcterms:created", as: :published +end +``` + +If more than one of these elements exists in the source, the value from the *last one* is used. The order of +the `element` declarations in the code is unimportant. The order they are encountered while parsing the +document determines the value assigned to the alias. + +If an element is defined in the source but is blank (e.g., `<pubDate></pubDate>`), it is ignored, and non-empty one is picked. + ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`)