Its pretty easy to transform Xml to HTML using Mulesoft's XSLT transform ..
Following is snapshot from my mule's config file ..
The Java component is used to provide following xml as an input :
Following is snapshot from my mule's config file ..
The Java component is used to provide following xml as an input :
<?xml version="1.0"?>
<catalog>
<book id="bk101">
<author>Gambardella, Matthew</author>
<title>XML Developer's Guide</title>
<genre>Computer</genre>
<price>44.95</price>
<publish_date>2000-10-01</publish_date>
<description>An in-depth look at creating applications
with XML.</description>
</book>
</catalog>
Following is the xsl code :
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" />
<xsl:template match="catalog">
<html>
<body>
<h2>My Book Collection</h2>
<table border="1">
<tr bgcolor="#9acd32">
<th>Book</th>
<th>Genre</th>
</tr>
<xsl:for-each select="book">
<tr>
<td>
<xsl:value-of select="title" />
</td>
<td>
<xsl:value-of select="genre" />
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Once the flow is executed I can see the final html file being created in the output folder.
I am using file:outbound-endpoint to write the contents in the output file ..
Thanks Nasreen, may I have your email I'd please ..
ReplyDeleteThanks for providing very useful information Mulesoft online training
ReplyDeleteThanks for writing such a good article, I stumbled onto your blog and read a few post. I like your style of writing…
ReplyDeleteMulesoft Online Training Banglore
awesome post presented by you..your writing style is fabulous and keep update with your blogs..
ReplyDeleteMulesoft online training india
ReplyDeletethanks for posting such a nice blog it really useful and anybody can understand it kindly update more details about
The article was very clear mulesoft Online Training
for more Info
Python Online Training
ServiceNow Online Training Bangalore
tableau online training
the blog is good and Interactive it is about Introduction To Xml to HTML Transformation using XSLT Transform in Mulesoft it is useful for students and Mulesoft Developers for more updates on Mulesoft follow the link
ReplyDeletemulesoft Online Trainig
For more info on other technologies go with below links
Python Online Training
tableau online training hyderabad
ServiceNow Online Training
Good post..Keep on sharing....
ReplyDeleteMuleSoft Online Training
MuleSoft Training in Hyderabad
I must appreciate you for providing such a valuable content for us. This is one amazing piece of article. Helped a lot in increasing my knowledge.mulesoft training in bangalore
ReplyDeleteNice post!! Thanks for sharing...
ReplyDeleteMulesoft Training in Bangalore
ReplyDeleteThank you for sharing wonderful information with us to get some idea about it.
Mulesoft Training Courses
Mulesoft Online Course
Online Mulesoft Training
Mulesoft Certification
Learn Mulesoft
Mulesoft Online Training
Mule 4 Training
Mulesoft Training
Mule Training
Mule 4 Certification