mercredi 6 mai 2015

templating ejs in node for xml

I have a big well-formed xml and I want tempalte it like do ejs.

`<foo>
  <url><%= url %></url>
<foo>`

but if I do

res.render('template.xml', { url: 'http://foo.com' })

I am getting

Error: Cannot find module 'xml'

Can anyone suggest how to deal with it? I need just insert values in already formed xml, I don't want to serialize object to xml by schema. THank you in advance

Aucun commentaire:

Enregistrer un commentaire