Chris Habgood wrote:
> Is there a way to do something like:
> 
> x = Builder::XmlMarkup.new(:target => $stdout, :indent => 1)
> x.instruct!
> x.response{
>       x.XXXXX{
> 
> XXXXX is a variable sent in to a method.

Can you clarify? I don't understand your question.

x.XXXXX { ... } would create an XML tag named "XXXXX"

<?xml version="1.0"?>
<response>
  <XXXXX>
    ...
  </XXXXX>
</response>

Attributes are added by passing in a hash x.XXXXX(:title => "foo", name 
=> "bar") { ... }

<?xml version="1.0"?>
<response>
  <XXXXX title="foo" name="bar">
    ...
  </XXXXX>
</response>

What are you actually trying to do?
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to