Hi,
I am having a xml template containing 5000 lines of code .
Now i need to generate the template dynamically in ruby on rails .
My requirement is every time a user clicks on GO , a new xml template
will generate for every user like “username.xml”.
I am not showing the xml template on screen , it will generate and
create on backend .
The template contains almost 3000 lines of code as static and only some
lines will be customized.
How should i start? Do i need to write by hand all lines using xml
builder or
is there any alternative ??
thanks,
sri…
Srinath A. wrote:
Hi,
I am having a xml template containing 5000 lines of code .
Now i need to generate the template dynamically in ruby on rails .
My requirement is every time a user clicks on GO , a new xml template
will generate for every user like “username.xml”.
I am not showing the xml template on screen , it will generate and
create on backend .
The template contains almost 3000 lines of code as static and only some
lines will be customized.
How should i start? Do i need to write by hand all lines using xml
builder or
is there any alternative ??
You don’t have to use Builder for XML. ERb and (in most cases) Haml
would work just as well.
But if 3000 lines are going to be static, perhaps you can somehow give
the user just the non-static part?
thanks,
sri…
Best,
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
Hi,
Thanks for reply.
The same xml template will generate every time, but only some parts are
customized .
The main motto is the total generation will go behind the scenes and
write to a new xml file each time .
I should be able write some ruby code , there some parts where i need to
do looping.
so I am expecting Ruby + xml file .
what about REXML ??
thanks
sri
Marnen Laibow-Koser wrote:
Srinath A. wrote:
Hi,
I am having a xml template containing 5000 lines of code .
Now i need to generate the template dynamically in ruby on rails .
My requirement is every time a user clicks on GO , a new xml template
will generate for every user like “username.xml”.
I am not showing the xml template on screen , it will generate and
create on backend .
The template contains almost 3000 lines of code as static and only some
lines will be customized.
How should i start? Do i need to write by hand all lines using xml
builder or
is there any alternative ??
You don’t have to use Builder for XML. ERb and (in most cases) Haml
would work just as well.
But if 3000 lines are going to be static, perhaps you can somehow give
the user just the non-static part?
thanks,
sri…
Best,
Marnen Laibow-Koser
http://www.marnen.org
[email protected]