Builder::XmlMarkup and dashes


#1

Has anyone hacked Builder::XmlMarkup to dasherize underscore tags by
default? I know I can use tag!, but I’d like to find a way for it to
translate underscores to dashes automatically. In other words:

xml.department_manager do
"fred
end

#=> fred

I tried hacking Builder::XmlBase.method_missing but got myself all
twisted up!

Thanks.

Steve


#2

On 6/10/07, removed_email_address@domain.invalid removed_email_address@domain.invalid wrote:

Has anyone hacked Builder::XmlMarkup to dasherize underscore tags by
default? I know I can use tag!, but I’d like to find a way for it to
translate underscores to dashes automatically. In other words:

xml.department_manager do
"fred
end

xml.tag! ‘department-manger’, ‘fred’


Rick O.
http://lighthouseapp.com
http://weblog.techno-weenie.net
http://mephistoblog.com


#3

Right, I know about ‘tag!’ but I was hoping to rig things such that
XmlMarkup always called ‘dasherize’ on element names.

Steve