Empact/roxml — Issue #37: know if a tag is empty or not
Author: jlecour
Created: 2011-12-02 10:07:49+00:00
State: open

Let's say I have an XML snippet like this :

````xml

My Title

````

and this mapping :

````ruby
class Author
include ROXML

xml_reader :whatever
end

class Article
include ROXML

xml_reader :title
xml_reader :author, :as => Author
end
````

Is it possible to know that the author is present without looking inside?
I wish I could something like this

````ruby
article = Article.from_xml(xml)
puts article.author.whatever if article.author.present?
````

Thanks for this really great gem. I use it a lot, and am very happy with it.