SlideShare a Scribd company logo
1 of 11
XML TO XML TRANSFORMATION
As we know, there can be multiple types of payload we need
to deal daily, starting from JSON, XML or String, we also
require different type of data transformation in our application
like XML to JSON, JSON to XML or String etc . In Mule
application, we have a various set of transformers that we
can use to obtain our required data format.
Here we will be discussing on transformation of XML to XML
format of data. If you have gone through my previous slides
on JSON to JSON transformation here , you will realize how
easy it is to perform such type of transformation in Mule.
Here we will take the same example, but will be doing it on
XML instead of JSON this time.
SO, LET US CONSIDER, WE HAVE THE FOLLOWING XML
PAYLOAD AS AN INPUT TO OUR APPLICATION :-
<RootTag>
<name>Anirban Sen Chowdhary</name>
<id>37</id>
</RootTag>
.
We can see here the XML contains only 2 elements,
that is name and id.
So, now if this XML data is coming as an input and we
require to transform/modify the payload into another
XML format and produce it as an output, something like
the following :-
<RootTag>
<name>Name</name>
<id>03</id>
<designation>CEO</designation>
</RootTag>
And here you can see the modified XML has a new element
designation as a third element . Now, the challenge here is to
modify the existing input XML payload and to design an
output XML payload from it, which will contain this additional
element in it with the same format.
So, how can we transform/modify the payload into another
XML format in an easy way. We know Mule has extremely
powerful tools called Datamapper but that limited to Mule
enterprise edition.
A simple way of doing it is using XSLT in Mule. Mule do have
XSLT support in it’s flow, which makes the life of a developer easy
in transforming/modifying XML in the required format.
So, here is the Mule flow which can be use to transform XML
payload from one format to another using XSLT :-
After that, we are setting the designation variable with a value,
which will be passed into our XSLT, and it will be adding it there
as a node called designation. So, the XML output coming after
XSLT will be the modified/transformed XML containing additional
node called designation.
T
src
he XSL file here named as Transform.xsl should be kept u
/main/resources folder and the xsl file will be as followin
nder
g :-
THE GRAPHICAL REPRESENTATION
OF THIS FLOW WILL BE AS
FOLLOWS :-
Now, we are done with our coding and will deploy our application
and test it.
Once deployed on Mule server, we can test our application using
RestClient or any other client you wish.
once we click the send button we will get the following response in
our client from our Mule flow :-
So, you can find transforming or modifying a XML payload into
another XML format is extremely easy in Mule using the XSLT.
And that means you can design your output XML payload in any
format you require using XSLT easily in your Mule flow and Mule
also support this by it’s XSLT transformer !!!
That’s all !!! I’ve hopefully been clear enough in displaying the
implementation of XSLT and XSLT transformer in designing and
modifying your XML payload which you can produce as an output
from your Mule application.

More Related Content

What's hot

What's hot (19)

Mule esb basic introduction
Mule esb basic introductionMule esb basic introduction
Mule esb basic introduction
 
Design flows in mule
Design flows in muleDesign flows in mule
Design flows in mule
 
Rabbit Mq in Mule
Rabbit Mq in MuleRabbit Mq in Mule
Rabbit Mq in Mule
 
Mule esb transformers
Mule esb transformersMule esb transformers
Mule esb transformers
 
Mule: Java Transformer
Mule: Java TransformerMule: Java Transformer
Mule: Java Transformer
 
Xslt in mule
Xslt in muleXslt in mule
Xslt in mule
 
Mule LDAP Connector
Mule LDAP ConnectorMule LDAP Connector
Mule LDAP Connector
 
Mule high availability
Mule high availabilityMule high availability
Mule high availability
 
Mule rabbitmq
Mule rabbitmqMule rabbitmq
Mule rabbitmq
 
File component in mule
File component in muleFile component in mule
File component in mule
 
Mule messages and transformers
Mule messages and transformersMule messages and transformers
Mule messages and transformers
 
Mule: Java Component
Mule: Java ComponentMule: Java Component
Mule: Java Component
 
Mule esb
Mule esbMule esb
Mule esb
 
Mule dataweave
Mule dataweaveMule dataweave
Mule dataweave
 
Mule jms
Mule   jmsMule   jms
Mule jms
 
Xml to-object-transformer
Xml to-object-transformerXml to-object-transformer
Xml to-object-transformer
 
Mule java part-1
Mule java part-1Mule java part-1
Mule java part-1
 
Mule soa
Mule soaMule soa
Mule soa
 
What is the difference between using private flow
What is the difference between using private flowWhat is the difference between using private flow
What is the difference between using private flow
 

Viewers also liked

Integrate with database by groovy
Integrate with database by groovyIntegrate with database by groovy
Integrate with database by groovySon Nguyen
 
Landmax_PPT_Rvsd
Landmax_PPT_RvsdLandmax_PPT_Rvsd
Landmax_PPT_RvsdSekhar M
 
Hélène guihéneuf chef de projet web et print - références
Hélène guihéneuf chef de projet web et print - référencesHélène guihéneuf chef de projet web et print - références
Hélène guihéneuf chef de projet web et print - référencesHélène Roch Guihéneuf
 
Bilan accompagnement numérique par Sud Vendée Tourisme 2015-2016
Bilan accompagnement numérique par Sud Vendée Tourisme 2015-2016Bilan accompagnement numérique par Sud Vendée Tourisme 2015-2016
Bilan accompagnement numérique par Sud Vendée Tourisme 2015-2016Sud Vendée Tourisme
 
SNI Dalam Angka 2016 - Edisi September
SNI Dalam Angka 2016 - Edisi SeptemberSNI Dalam Angka 2016 - Edisi September
SNI Dalam Angka 2016 - Edisi SeptemberMuhammad Bahrudin
 
Caching & validating
Caching & validatingCaching & validating
Caching & validatingSon Nguyen
 
Abstrak proposal skripsi
Abstrak proposal skripsiAbstrak proposal skripsi
Abstrak proposal skripsiYudha Haqqi
 
Laporan Resmi Praktikum Biologi Tahapan Mitosis dan Meiosis Tumbuhan
Laporan Resmi Praktikum Biologi Tahapan Mitosis dan Meiosis TumbuhanLaporan Resmi Praktikum Biologi Tahapan Mitosis dan Meiosis Tumbuhan
Laporan Resmi Praktikum Biologi Tahapan Mitosis dan Meiosis TumbuhanDhiarrafii Bintang Matahari
 
Sunway University- New University Building (NUB)
Sunway University- New University Building (NUB)Sunway University- New University Building (NUB)
Sunway University- New University Building (NUB)Saidah Malihah
 
Laporan hasil observasi tanaman obat di desa tangkilan
Laporan hasil observasi tanaman obat di desa tangkilanLaporan hasil observasi tanaman obat di desa tangkilan
Laporan hasil observasi tanaman obat di desa tangkilanAgus Ariyanto
 
Dasar-dasar Teknik Fermentasi
Dasar-dasar Teknik FermentasiDasar-dasar Teknik Fermentasi
Dasar-dasar Teknik Fermentasiyuliartiramli
 
Motivator Indonesia, Mindset revolution
Motivator Indonesia, Mindset revolutionMotivator Indonesia, Mindset revolution
Motivator Indonesia, Mindset revolutioniwel sastra
 
6 Amalan Penyelamat Agar Terhindari Dari Api Neraka
6 Amalan Penyelamat Agar Terhindari Dari Api Neraka6 Amalan Penyelamat Agar Terhindari Dari Api Neraka
6 Amalan Penyelamat Agar Terhindari Dari Api Nerakapresentasionline
 
DDBJ センターにおける一次データベースの展開
DDBJ センターにおける一次データベースの展開DDBJ センターにおける一次データベースの展開
DDBJ センターにおける一次データベースの展開DNA Data Bank of Japan center
 

Viewers also liked (20)

Integrate with database by groovy
Integrate with database by groovyIntegrate with database by groovy
Integrate with database by groovy
 
Shalat dan khutbah jumat
Shalat dan khutbah jumatShalat dan khutbah jumat
Shalat dan khutbah jumat
 
Landmax_PPT_Rvsd
Landmax_PPT_RvsdLandmax_PPT_Rvsd
Landmax_PPT_Rvsd
 
20110426
2011042620110426
20110426
 
Ada adicional
Ada adicionalAda adicional
Ada adicional
 
Hélène guihéneuf chef de projet web et print - références
Hélène guihéneuf chef de projet web et print - référencesHélène guihéneuf chef de projet web et print - références
Hélène guihéneuf chef de projet web et print - références
 
Bilan accompagnement numérique par Sud Vendée Tourisme 2015-2016
Bilan accompagnement numérique par Sud Vendée Tourisme 2015-2016Bilan accompagnement numérique par Sud Vendée Tourisme 2015-2016
Bilan accompagnement numérique par Sud Vendée Tourisme 2015-2016
 
SNI Dalam Angka 2016 - Edisi September
SNI Dalam Angka 2016 - Edisi SeptemberSNI Dalam Angka 2016 - Edisi September
SNI Dalam Angka 2016 - Edisi September
 
Scopes
ScopesScopes
Scopes
 
Le attività ARPAL sul Mare
Le attività ARPAL sul MareLe attività ARPAL sul Mare
Le attività ARPAL sul Mare
 
Caching & validating
Caching & validatingCaching & validating
Caching & validating
 
Abstrak proposal skripsi
Abstrak proposal skripsiAbstrak proposal skripsi
Abstrak proposal skripsi
 
Laporan Resmi Praktikum Biologi Tahapan Mitosis dan Meiosis Tumbuhan
Laporan Resmi Praktikum Biologi Tahapan Mitosis dan Meiosis TumbuhanLaporan Resmi Praktikum Biologi Tahapan Mitosis dan Meiosis Tumbuhan
Laporan Resmi Praktikum Biologi Tahapan Mitosis dan Meiosis Tumbuhan
 
Sunway University- New University Building (NUB)
Sunway University- New University Building (NUB)Sunway University- New University Building (NUB)
Sunway University- New University Building (NUB)
 
Laporan hasil observasi tanaman obat di desa tangkilan
Laporan hasil observasi tanaman obat di desa tangkilanLaporan hasil observasi tanaman obat di desa tangkilan
Laporan hasil observasi tanaman obat di desa tangkilan
 
CVP Analysis
CVP AnalysisCVP Analysis
CVP Analysis
 
Dasar-dasar Teknik Fermentasi
Dasar-dasar Teknik FermentasiDasar-dasar Teknik Fermentasi
Dasar-dasar Teknik Fermentasi
 
Motivator Indonesia, Mindset revolution
Motivator Indonesia, Mindset revolutionMotivator Indonesia, Mindset revolution
Motivator Indonesia, Mindset revolution
 
6 Amalan Penyelamat Agar Terhindari Dari Api Neraka
6 Amalan Penyelamat Agar Terhindari Dari Api Neraka6 Amalan Penyelamat Agar Terhindari Dari Api Neraka
6 Amalan Penyelamat Agar Terhindari Dari Api Neraka
 
DDBJ センターにおける一次データベースの展開
DDBJ センターにおける一次データベースの展開DDBJ センターにおける一次データベースの展開
DDBJ センターにおける一次データベースの展開
 

Similar to Xml to xml transformation

Xml to xml transformation in mule
Xml to xml transformation in muleXml to xml transformation in mule
Xml to xml transformation in muleRajkattamuri
 
Xml to xml transformation in mule
Xml to xml transformation in muleXml to xml transformation in mule
Xml to xml transformation in mulejaveed_mhd
 
Xml to xml transformation in mule
Xml to xml transformation in muleXml to xml transformation in mule
Xml to xml transformation in muleMohammed625
 
Mule xml transformation
Mule xml transformationMule xml transformation
Mule xml transformationD.Rajesh Kumar
 
Xml to xml transformation in mule
Xml to xml transformation in muleXml to xml transformation in mule
Xml to xml transformation in mulemdfkhan625
 
Xml to xml transformation in mule
Xml to xml transformation in muleXml to xml transformation in mule
Xml to xml transformation in muleGermano Barba
 
Xml to xml transformation in mule
Xml to xml transformation in muleXml to xml transformation in mule
Xml to xml transformation in muleDavide Rapacciuolo
 
Xml to xml transformation in mule
Xml to xml transformation in muleXml to xml transformation in mule
Xml to xml transformation in muleDavide Rapacciuolo
 
Using xslt in mule
Using xslt in mule Using xslt in mule
Using xslt in mule javeed_mhd
 
Using xslt in mule
Using xslt in mule Using xslt in mule
Using xslt in mule Rajkattamuri
 
Using xslt in mule
Using  xslt in muleUsing  xslt in mule
Using xslt in muleKhan625
 
Using xslt in mule
Using xslt in mule Using xslt in mule
Using xslt in mule mdfkhan625
 
Xslt in mule
Xslt in muleXslt in mule
Xslt in muleirfan1008
 
Xslt with mule
Xslt with muleXslt with mule
Xslt with muleSon Nguyen
 

Similar to Xml to xml transformation (20)

Xml transform
Xml transformXml transform
Xml transform
 
Xml to xml transformation in mule
Xml to xml transformation in muleXml to xml transformation in mule
Xml to xml transformation in mule
 
Xml to xml transformation in mule
Xml to xml transformation in muleXml to xml transformation in mule
Xml to xml transformation in mule
 
Xml to xml transformation in mule
Xml to xml transformation in muleXml to xml transformation in mule
Xml to xml transformation in mule
 
Mule xml transformation
Mule xml transformationMule xml transformation
Mule xml transformation
 
Xml to xml transformation in mule
Xml to xml transformation in muleXml to xml transformation in mule
Xml to xml transformation in mule
 
Xml to xml transformation in mule
Xml to xml transformation in muleXml to xml transformation in mule
Xml to xml transformation in mule
 
Xml to xml transformation in mule
Xml to xml transformation in muleXml to xml transformation in mule
Xml to xml transformation in mule
 
Xml to xml transformation in mule
Xml to xml transformation in muleXml to xml transformation in mule
Xml to xml transformation in mule
 
Using xslt in mule
Using xslt in mule Using xslt in mule
Using xslt in mule
 
Using xslt in mule
Using xslt in mule Using xslt in mule
Using xslt in mule
 
Using xslt in mule
Using  xslt in muleUsing  xslt in mule
Using xslt in mule
 
Using xslt in mule
Using xslt in mule Using xslt in mule
Using xslt in mule
 
Using xslt in mule
Using xslt in mule Using xslt in mule
Using xslt in mule
 
Xslt in mule
Xslt in muleXslt in mule
Xslt in mule
 
Xslt in mule
Xslt in muleXslt in mule
Xslt in mule
 
Xslt in mule
Xslt in muleXslt in mule
Xslt in mule
 
Xslt in mule
Xslt in muleXslt in mule
Xslt in mule
 
Xslt with mule
Xslt with muleXslt with mule
Xslt with mule
 
Transformation xmltoobjectesb
Transformation xmltoobjectesbTransformation xmltoobjectesb
Transformation xmltoobjectesb
 

More from Son Nguyen

Wsdl connector introduction
Wsdl connector introductionWsdl connector introduction
Wsdl connector introductionSon Nguyen
 
Android intergrate with mule
Android intergrate with muleAndroid intergrate with mule
Android intergrate with muleSon Nguyen
 
Mule flow overview
Mule flow overviewMule flow overview
Mule flow overviewSon Nguyen
 
Mule flow and filter
Mule flow and filterMule flow and filter
Mule flow and filterSon Nguyen
 
Handle exceptions in mule
Handle exceptions in muleHandle exceptions in mule
Handle exceptions in muleSon Nguyen
 
Spring security integrate with mule
Spring security integrate with muleSpring security integrate with mule
Spring security integrate with muleSon Nguyen
 
Message processor in mule
Message processor in muleMessage processor in mule
Message processor in muleSon Nguyen
 
Expression language in mule
Expression language in muleExpression language in mule
Expression language in muleSon Nguyen
 
Mule with data weave
Mule with data weaveMule with data weave
Mule with data weaveSon Nguyen
 
Using spring scheduler mule
Using spring scheduler muleUsing spring scheduler mule
Using spring scheduler muleSon Nguyen
 
Composite source in bound and out-bound
Composite source in bound and out-boundComposite source in bound and out-bound
Composite source in bound and out-boundSon Nguyen
 
Batch job processing
Batch job processingBatch job processing
Batch job processingSon Nguyen
 
Using message enricher
Using message enricherUsing message enricher
Using message enricherSon Nguyen
 
Finance connectors with mule
Finance connectors with muleFinance connectors with mule
Finance connectors with muleSon Nguyen
 
Google drive connection
Google drive connectionGoogle drive connection
Google drive connectionSon Nguyen
 
Using properties in mule
Using properties in muleUsing properties in mule
Using properties in muleSon Nguyen
 
Mule integrate with microsoft
Mule integrate with microsoftMule integrate with microsoft
Mule integrate with microsoftSon Nguyen
 
Anypoint connectors
Anypoint connectorsAnypoint connectors
Anypoint connectorsSon Nguyen
 
Runing batch job in mule
Runing batch job in muleRuning batch job in mule
Runing batch job in muleSon Nguyen
 

More from Son Nguyen (20)

Wsdl connector introduction
Wsdl connector introductionWsdl connector introduction
Wsdl connector introduction
 
Android intergrate with mule
Android intergrate with muleAndroid intergrate with mule
Android intergrate with mule
 
Mule flow overview
Mule flow overviewMule flow overview
Mule flow overview
 
Mule flow and filter
Mule flow and filterMule flow and filter
Mule flow and filter
 
Handle exceptions in mule
Handle exceptions in muleHandle exceptions in mule
Handle exceptions in mule
 
Spring security integrate with mule
Spring security integrate with muleSpring security integrate with mule
Spring security integrate with mule
 
Message processor in mule
Message processor in muleMessage processor in mule
Message processor in mule
 
Expression language in mule
Expression language in muleExpression language in mule
Expression language in mule
 
Mule with data weave
Mule with data weaveMule with data weave
Mule with data weave
 
Using spring scheduler mule
Using spring scheduler muleUsing spring scheduler mule
Using spring scheduler mule
 
Composite source in bound and out-bound
Composite source in bound and out-boundComposite source in bound and out-bound
Composite source in bound and out-bound
 
Batch job processing
Batch job processingBatch job processing
Batch job processing
 
Using message enricher
Using message enricherUsing message enricher
Using message enricher
 
Finance connectors with mule
Finance connectors with muleFinance connectors with mule
Finance connectors with mule
 
Google drive connection
Google drive connectionGoogle drive connection
Google drive connection
 
Using properties in mule
Using properties in muleUsing properties in mule
Using properties in mule
 
Mule integrate with microsoft
Mule integrate with microsoftMule integrate with microsoft
Mule integrate with microsoft
 
Jms queue
Jms queueJms queue
Jms queue
 
Anypoint connectors
Anypoint connectorsAnypoint connectors
Anypoint connectors
 
Runing batch job in mule
Runing batch job in muleRuning batch job in mule
Runing batch job in mule
 

Recently uploaded

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 

Recently uploaded (20)

Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 

Xml to xml transformation

  • 1. XML TO XML TRANSFORMATION
  • 2. As we know, there can be multiple types of payload we need to deal daily, starting from JSON, XML or String, we also require different type of data transformation in our application like XML to JSON, JSON to XML or String etc . In Mule application, we have a various set of transformers that we can use to obtain our required data format. Here we will be discussing on transformation of XML to XML format of data. If you have gone through my previous slides on JSON to JSON transformation here , you will realize how easy it is to perform such type of transformation in Mule. Here we will take the same example, but will be doing it on XML instead of JSON this time.
  • 3. SO, LET US CONSIDER, WE HAVE THE FOLLOWING XML PAYLOAD AS AN INPUT TO OUR APPLICATION :- <RootTag> <name>Anirban Sen Chowdhary</name> <id>37</id> </RootTag> .
  • 4. We can see here the XML contains only 2 elements, that is name and id. So, now if this XML data is coming as an input and we require to transform/modify the payload into another XML format and produce it as an output, something like the following :- <RootTag> <name>Name</name> <id>03</id> <designation>CEO</designation> </RootTag>
  • 5. And here you can see the modified XML has a new element designation as a third element . Now, the challenge here is to modify the existing input XML payload and to design an output XML payload from it, which will contain this additional element in it with the same format. So, how can we transform/modify the payload into another XML format in an easy way. We know Mule has extremely powerful tools called Datamapper but that limited to Mule enterprise edition.
  • 6. A simple way of doing it is using XSLT in Mule. Mule do have XSLT support in it’s flow, which makes the life of a developer easy in transforming/modifying XML in the required format. So, here is the Mule flow which can be use to transform XML payload from one format to another using XSLT :-
  • 7. After that, we are setting the designation variable with a value, which will be passed into our XSLT, and it will be adding it there as a node called designation. So, the XML output coming after XSLT will be the modified/transformed XML containing additional node called designation. T src he XSL file here named as Transform.xsl should be kept u /main/resources folder and the xsl file will be as followin nder g :-
  • 8. THE GRAPHICAL REPRESENTATION OF THIS FLOW WILL BE AS FOLLOWS :-
  • 9. Now, we are done with our coding and will deploy our application and test it. Once deployed on Mule server, we can test our application using RestClient or any other client you wish.
  • 10. once we click the send button we will get the following response in our client from our Mule flow :-
  • 11. So, you can find transforming or modifying a XML payload into another XML format is extremely easy in Mule using the XSLT. And that means you can design your output XML payload in any format you require using XSLT easily in your Mule flow and Mule also support this by it’s XSLT transformer !!! That’s all !!! I’ve hopefully been clear enough in displaying the implementation of XSLT and XSLT transformer in designing and modifying your XML payload which you can produce as an output from your Mule application.