Static HTML in XML Builder or otherwise; With Dynamic Sectio

Best way to display HTML file as text or xml where some parts are
dynamic?

So we have a Static HTML file and some portions will be dynamically
changed.

The Idea is to render as text or xml simply.

If we read this Template HTML file and Dynamically change it, where
should we store this HTML file?

If we create using XML Builder, would static HTML Part still be needed
to be coded using Ruby? How can I put Static HTML part in XML Builder?

Smart RoR wrote:

Best way to display HTML file as text or xml where some parts are
dynamic?

So we have a Static HTML file and some portions will be dynamically
changed.

The Idea is to render as text or xml simply.

If we read this Template HTML file and Dynamically change it, where
should we store this HTML file?

If we create using XML Builder, would static HTML Part still be needed
to be coded using Ruby? How can I put Static HTML part in XML Builder?

Anyone?

I am thinking to just use XML Builder for HTML here, as static part is
very less…

Smart RoR wrote:

Best way to display HTML file as text or xml where some parts are
dynamic?

I really don’t understand what you’re trying to do there. How is what
you are describing any different than standard ERB templates. They are
static HTML with some dynamic parts.

So we have a Static HTML file and some portions will be dynamically
changed.

Again isn’t that what ERB is?

The Idea is to render as text or xml simply.

Both HTML and XML are just text anyway.

If we read this Template HTML file and Dynamically change it, where
should we store this HTML file?

I’d store them in app/views where all the other HTML templates are
stored. With the dynamic parts rendered with ERB.

If we create using XML Builder, would static HTML Part still be needed
to be coded using Ruby? How can I put Static HTML part in XML Builder?

I can see no need for any of this. Just put the static HTML inside a
view template and render the dynamic parts with ERB (or HAML if that’s
what you might prefer).

Robert W. wrote:

Smart RoR wrote:

Best way to display HTML file as text or xml where some parts are
dynamic?

I really don’t understand what you’re trying to do there. How is what
you are describing any different than standard ERB templates. They are
static HTML with some dynamic parts.

So we have a Static HTML file and some portions will be dynamically
changed.

Again isn’t that what ERB is?

The Idea is to render as text or xml simply.

Both HTML and XML are just text anyway.

If we read this Template HTML file and Dynamically change it, where
should we store this HTML file?

I’d store them in app/views where all the other HTML templates are
stored. With the dynamic parts rendered with ERB.

If we create using XML Builder, would static HTML Part still be needed
to be coded using Ruby? How can I put Static HTML part in XML Builder?

I can see no need for any of this. Just put the static HTML inside a
view template and render the dynamic parts with ERB (or HAML if that’s
what you might prefer).

Thanks. You are right.

This was part of direct pure AJAX JS call. Still I also think it can
still interpret as text whether we output from erb or xml builder.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs