Contacto +52(442)298-0967 msn@swideascom

XSLT template parse XML as HTML table

XSLT template parse XML as HTML table

Code-OptimizationThe goal here is create an XSLT template to display a HTML table based on XML parsed data. Nothing fancy but really complicated if you try it using a third-party xslt software (like Altova StyleVision 2013/2014 which use their own xslt processor and generated templates only can be transformed using it, not cool Altova, not cool) , so back to the basics, open that SublimeText/Notepad++ or any simple text editor of your choice and let’s start with the data:

The XML object:

 Now, the core, our XSLT template:

In this first approach I’m avoiding to use COLSPAN and another real-life properties (implementation soon, I promise). So the result if we apply our XSLT will be like this:

And look like this:

[C1R1] [C2R1]
[C1R2] [C2R2]
[C1R3] [C2R3]


Still feeling sceptical?

Try it your self!

Thanks for reading and hope this was helpful.




 Check : O Reilly XSLT 2nd Edition


CEO SWFideas pro·gram·mer (n) An organism capable of converting caffeine into code. *RichMedia Developer | *Homodevelopus


Leave a reply