JavaScript library/framework to generate XHTML from parameters?

blaznspadz

New Member
I have a rather complicated question :)I want to send data in form of json from the server to the client.There the data shall be used by javascript to generate XHTML from this data.Now I am looking for a library/framework that helps me generate this XHTML from JSON.For example a solution could be to have special XHTML "template" files that contain variables which are mapped by name to a javascript method and that method takes the JSON array and fills some parts of the XHTML with the variables in the JSON array.Example Template File (Pseudocode):filename: TemplateA.something\[code\]<html>Hello my name is %VARIABLE1% !</html>\[/code\]And the frameworks generates me then a method like that (Pseudocode):\[code\]generateXHTMLfromTemplate(templatename, data);\[/code\]and it would return XHTML.For example i would then call it like that (Pseudocode):\[code\]container.html(generateXHTMLfromTemplate('TemplateA', '{"VARIABLE1" : "Earl"}'));\[/code\]Something like that would be great, the best would be code-completion of these "template" files in eclipse ;)
 
Back
Top