From: Josh Vaughn Date: 2011-08-12T23:55:49+09:00 Subject: Re: parsing xml string into seprate line of string --0-1919285039-1313160550=:11651 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hello,=0A=0Agive the following a try.=0A=0Astr =3D "<note>\n= <to>Tove</to>\n<from>Jani</from>\n<headi= ng>Reminder</heading>\n<body>Don't forget me this we= ekend!</body>\n</note>"=0Astr.each_line { |s| puts s }= =0A=0AThanks=0AJosh=0A=0A=0A>________________________________=0A>From= : saurabh a. <saurabh_anand2002@yahoo.com>=0A>To: ruby-talk ML <= ;ruby-talk@ruby-lang.org>=0A>Sent: Thursday, August 11, 2011 1:48 PM= =0A>Subject: parsing xml string into seprate line of string=0A>=0A>= ;HI,=0A>=0A>Thanks for the help.=0A>=0A>i have a xml and want t= o parse it line by line. suppose i have=0A>abc =3D "<a1>=0A&g= t;=A0 =A0 =A0 <a2>123</a2>=0A>=A0 =A0 =A0 <a3>123<= ;/a2>=0A>=A0 =A0 =A0 <a4>123</a2>=0A>=A0 =A0 =A0 <= ;a5>123</a2>=0A>=A0 =A0 =A0 </a1>"=0A>=0A>and= i want to parse it line by line. there could be any number of line.=0A>= my output should be seperate string like=0A>"<a1>"=0A>= ;"<a2>123</a2>"=0A>"<a3>123</a3>&= quot;=0A>"<a4>123</a4>"=0A>"<a5>123&= lt;/a2>"=0A>"</a1>"=0A>=0A>how can i achei= ve this one using any string function or regular=0A>expression.=0A>= =0A>Please help.=0A>=0A>Thanks=0A>Saurabh=0A>=0A>-- =0A&g= t;Posted via http://www.ruby-forum.com/.=0A>=0A>=0A>=0A> --0-1919285039-1313160550=:11651--