how to create xml template

Posted by RohiK under XML on 12/7/2010 | Points: 10 | Views : 7377 | Status : [Member] | Replies : 5
hi,

i want to create xml template ? how to create it? i want to replace it with dynamic content

plz help

Happy Programming!!
Rohi



Responses

Posted by: SheoNarayan on: 12/7/2010 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
Do you mean XSLT when you say xml template?

Read below article, this will help you creating dynamic pages with the help of XSLT (XSLT is used to transform an xml document).

http://www.codeproject.com/KB/XML/xmlxsltransformer.aspx
http://www.aspfree.com/c/a/XML/Applying-XSLT-to-XML-Using-ASP.NET/

Also read http://www.csharpfriends.com/Articles/getArticle.aspx?articleID=63 that may help.

Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

RohiK, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: RohiK on: 12/7/2010 [Member] Starter | Points: 25

Up
0
Down
Thanks for your reply.
but I don't understand it throughly .

I want to generate .cs code using template means. If i want to insert into database then I want to change column name only in insert query and that same content i will put into xml and i will replace only column values.
I want t do that using xml template is it possible?

when I am searching i found many template engine is it necessary?

Happy Programming!!
Rohi

RohiK, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Muhsinathk on: 9/18/2012 [Member] Bronze | Points: 25

Up
0
Down
XML content assist provides a comment template, a section of predefined code that you can insert into a file. You may find a template useful when you have a certain piece of code you want to reuse several times, and you do not want to write it out every time.

To create a new XML template, complete the following steps:

1) Click Window > Preferences and select XML > XML Files > Templates.

2)Click New if you want to create a completely new template.

3)Supply a new template Name and Description.

4)Specify the Context for the template. This is the context in which the template is available in the proposal list when content assist is requested.

5) Specify the Pattern for your template using the appropriate tags, attributes, or attribute values to be inserted by content assist.

6) If you want to insert a variable, click the Insert Variable button and select the variable to be inserted. For example, the date variable indicates the current date will be inserted.
7)Click OK and then Apply to save your changes.


RohiK, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Muhsinathk on: 9/18/2012 [Member] Bronze | Points: 25

Up
0
Down
Please mark as answer if it helpful to you..That helps others who search the same..

RohiK, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Hariinakoti on: 9/18/2012 [Member] Starter | Points: 25

Up
0
Down
Nice Explanation Muhsinathk

Thanks & Regards
Hari

RohiK, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response