XML Element attributes

Hi.

I'm trying to create an XML file of the following schema:

<data>
  <event start = "July 12 2007 " end="July 14 2007 ">
     Some description text here
   </event>
  <event start = "July 20 2007 " end="July 30 2007 ">
     Some description text here
   </event>
</data>

And I only managed to accomplish the following schema:

<data>
    <event>
      <start>July 12 2007</start>
      <end>July 14 2007</end>
      <p> Some description text here </p>
     </event>
      <start>July 20 2007</start>
      <end>July 30 2007</end>
      <p> Some description text here </p>
</data>

using the following codes:

xml.instruct! :xml, :version=>"1.0"
xml.data{
  for vac in @vacations
    xml.event do
    xml.start(vac.start_date.strftime"%B %d %Y" )
    xml.end (vac.end_date.strftime"%B %d %Y" )
    xml.p(vac.description)
    end
  end
}

Can someone help point out how I may accomplish that? Having the
element in the format of
<event start = "...." end="..." >Some text here </event>

Thank you in advance for your help.

Hi,

I'm trying to create an XML file of the following schema:
<data>
  <event start = "July 12 2007 " end="July 14 2007 ">
     Some description text here
  
you can pass the text of the tag as the first parameter and any attributes as a hash.

xml.event 'Some description text', :start=>'July 12 2007', :end=>'July 14 2007'

regards,

javier ramirez

It works great for me.
Thank you SO much Javier for your help.