how to parse xml file in html.erb
<%
xml = Hpricot.parse(@chunk_of_xml_data)
data = (xml/:uid) %>
<% data.each { |u| %>
<%= u.innerHTML %>
<% } %>
On Thu, Jul 24, 2008 at 07:25:51PM +0900, Lost W. wrote:
how to parse xml file in html.erb
<%
xml = Hpricot.parse(@chunk_of_xml_data)
data = (xml/:uid) %>
<% data.each { |u| %>
<%= u.innerHTML %>
<% } %>
This does not belong in the view. Put it either in the controller or the
helper.
–Greg