Html generation: Xslt vs String.Replace -


In this scenario, you have a business object that is called an employee, which contains all the information about the employee. The object exists in XML form as well as in the generic Net object.

If you want to know which of the following methods are fast:

To use the XSLT stylesheet, the employee's XML should be either html

or

Using something like HTML resource file and .NET string. Change the resource file to replace the keywords with your respective employee object properties?

Using XSLT to convert your XML to HTML without doubt; In addition, maintenance will be much easier.

Edit : And references:

If you have a small HTML, then this will not be a problem; But, as your HTML grows, it can be a maintenance nightmare. For example, with your custom object data, & lt; Table & gt; Filling; Construction header can be easy, but for each item collection, and lt; Tr & gt; Adding and complication increases.

You also have another option: If you are developing an asp.net application, you can develop the template as a webpage, it can execute it with your code and your own Can get HTML If you are likely to work with the WYSIWYG editor and speed up your development.


Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -