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