Let's say I have an XML snippet like this :
<article>
<title>My Title</title>
<author/>
</article>
and this mapping :
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
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.
Let's say I have an XML snippet like this :
and this mapping :
Is it possible to know that the author is present without looking inside?
I wish I could something like this
Thanks for this really great gem. I use it a lot, and am very happy with it.