From: Song Choe Date: 2009-04-30T00:29:02+09:00 Subject: Re: How to eliminate hash tag when to_xml is used. --_27fd0502-5ea4-4f63-968b-f6d32cb8eaba_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Thank you!!! THis helps!! Song=2C > Date: Wed=2C 29 Apr 2009 10:30:05 +0900 > From: mark@thomaszone.com > Subject: Re: How to eliminate hash tag when to_xml is used. > To: ruby-talk@ruby-lang.org >=20 > On Apr 28=2C 8:34 pm=2C Song Choe wrote: > > # help > > > > Hi=2C everyone=2C > > > > I have a hash obj and when converted to xml using to_xml the tag appears like the following > > > > > > > > > > .. > > > > > > I want to get rid of that so that it is just > > > > > > .. > > >=20 > Since you want the xml declaration=2C I assume you want a valid XML > document. A valid XML document must have exactly one root element. You > cannot remove the root=2C because then if your hash had more than one > entry it would produce multiple roots and thus invalid XML. >=20 > You can change the name of the element=2C however: > hash.to_xml({:root =3D> 'steps'}) >=20 > -- Mark. >=20 _________________________________________________________________ Windows Live=99 Hotmail=AE:=85more than just e-mail. http://windowslive.com/online/hotmail?ocid=3DTXT_TAGLM_WL_HM_more_042009= --_27fd0502-5ea4-4f63-968b-f6d32cb8eaba_--