As you all know, with Rails it is possible to use Builder::XMLMarkup templates to provide an http reponse in XML format instead of HTML (with the respond_to command). My problem is that I would like to use the Builder::XMLMarkup templating system not with Rails but with Ruby only (i.e. a standalone program that generates/outputs an XML file from an XML template). The question is then twofold:
- How do I tell the Ruby program which is the template I want to use? and
- How do I tell the Builder class which is the output XML file ?
There is already a similar answer to that in Stackoverflow (http://stackoverflow.com/questions/2176287/how-do-i-generate-xml-from-xmlbuilder-using-a-xml-builder-file), but I am afraid it is only valid for Rails.
Thanks a lot in advance
Miquel