Hi,
I’m trying to parse a XML document and put some of that information
inside a rhtml file. I also have partials that I want to wrap around
content in the XML stream. However, I don’t have any clue how to pass
an object to the SAX2Listener so it can combine the partials and the XML
together. Normally, in java I would pass the HttpResponse object or the
PrintWriter object to the SAX2Listener class. WHat’s the equivalent
with erb? And how do I combine my partials with it as well? eRB is a
pull type interaction, but SAX is a push, and it makes it hard. So here
is a little example of what I’m thinking:
Hi <%= @name %>
<%
parser = SAX2Parser.new
myListener = MyListener.new( ??? ) <-- pass the PrintWriter object
like thing here?
parser.parse
%>
Sincerely,
<%= @management %>
<%= @advertisements %>