my code looks like this:
xml.instruct!
xml.county(name: @jurisdiction.name, id: @jurisdiction.jurisdictionID)
do
xml.officials do
@officials.each do |official|
xml.official do
xml.firstname official.firstname
xml.lastname official.lastname
xml.eotypeID eotypeID: official.eotypeID
xml.eotype EoType.find(official.eotypeID).name
xml.sourceID sourceID: official.sourceID
xml.source SourceType.find(official.sourceID).name
end
end
end
end
which produces this:
Hector Someone Primary State Web S. Lucy Someone-Else Registration HistoryI would like to change it to produce this:
Hector Someone Primary Web S. Lucy Someone-Else Registration HistoryI cannot find any documentation or examples on the point. Can someone
offer
a helpful hint or point to some useful documentation that covers the
subject, where the primary point is this: Using XML Builder, or some
other
facility, how does one emit an element instance that has both attributes
and non-empty content? There are losts of ways to do it with brute
force;
just trying to find an “elegant” solution.
Thanks for any suggestions