SlideShare ist ein Scribd-Unternehmen logo
1 von 16
XML to XML transformation in Mule
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>Anirban Sen Chowdhary</name>
<id>37</id>
<designation>Director</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.
How to transform or modify a XML payload in
Mule ??
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.
The XSL file here named as Transform.xsl should be kept under
src/main/resources folder and the xsl file will be as following :-
The graphical representation of this flow will be as follows :-
Testing our application 


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 :-
Conclusion
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.
I hope you liked this !!!
Hope you enjoyed the simple yet an amazing trick in Mule
You can also find this post here :- http://bushorn.com/xml-to-xml-
transformation-in-mule/
Xml to xml transformation in mule

Weitere Àhnliche Inhalte

Was ist angesagt?

Xslt in mule
Xslt in muleXslt in mule
Xslt in muleMohammed246
 
Mulesoft http connector
Mulesoft http connectorMulesoft http connector
Mulesoft http connectorkumar gaurav
 
Json to json transformation in mule
Json to json transformation in muleJson to json transformation in mule
Json to json transformation in muleAntonio Pellegrino
 
Scatter and gather in mule
Scatter and gather in muleScatter and gather in mule
Scatter and gather in muleRajkattamuri
 
Stored procedure in Mule
Stored procedure in MuleStored procedure in Mule
Stored procedure in MuleKhasim Saheb
 
Mule Message Properties Component
Mule Message Properties ComponentMule Message Properties Component
Mule Message Properties ComponentDurga Prasad Kakarla
 
Send email attachment using smtp in mule esb
Send email attachment using smtp in mule esbSend email attachment using smtp in mule esb
Send email attachment using smtp in mule esbPraneethchampion
 

Was ist angesagt? (11)

xslt in mule
xslt in mulexslt in mule
xslt in mule
 
Mule soap
Mule soapMule soap
Mule soap
 
Xslt in mule
Xslt in muleXslt in mule
Xslt in mule
 
Mulesoft http connector
Mulesoft http connectorMulesoft http connector
Mulesoft http connector
 
Json to json transformation in mule
Json to json transformation in muleJson to json transformation in mule
Json to json transformation in mule
 
Scatter and gather in mule
Scatter and gather in muleScatter and gather in mule
Scatter and gather in mule
 
Stored procedure in Mule
Stored procedure in MuleStored procedure in Mule
Stored procedure in Mule
 
Splitting with mule part2
Splitting with mule part2Splitting with mule part2
Splitting with mule part2
 
Using XSLT in Mule
Using XSLT in MuleUsing XSLT in Mule
Using XSLT in Mule
 
Mule Message Properties Component
Mule Message Properties ComponentMule Message Properties Component
Mule Message Properties Component
 
Send email attachment using smtp in mule esb
Send email attachment using smtp in mule esbSend email attachment using smtp in mule esb
Send email attachment using smtp in mule esb
 

Andere mochten auch

Mule anypoint workday-devkit
Mule  anypoint workday-devkitMule  anypoint workday-devkit
Mule anypoint workday-devkitcharan teja R
 
Mule oracle connectors
Mule oracle connectorsMule oracle connectors
Mule oracle connectorsPhaniu
 
MuleEsb Complete integration and middleware solution
MuleEsb Complete integration and middleware solutionMuleEsb Complete integration and middleware solution
MuleEsb Complete integration and middleware solutionRajkattamuri
 
Mule execution
Mule executionMule execution
Mule executionPhaniu
 
Mule esb data weave multi input data
Mule esb data weave multi input dataMule esb data weave multi input data
Mule esb data weave multi input dataAnilKumar Etagowni
 
Mule Maven Plugin
Mule Maven PluginMule Maven Plugin
Mule Maven Pluginjaveed_mhd
 
Deploying and running in mule standalone
Deploying and running in mule standaloneDeploying and running in mule standalone
Deploying and running in mule standaloneMohammed625
 
Validating a soap request in mule
Validating a soap request in mule Validating a soap request in mule
Validating a soap request in mule AbdulImrankhan7
 
Mule Tcat server
Mule  Tcat serverMule  Tcat server
Mule Tcat serverD.Rajesh Kumar
 
For each component in mule demo
For each component in mule demoFor each component in mule demo
For each component in mule demoSudha Ch
 
Mule with stored procedure
Mule with stored procedureMule with stored procedure
Mule with stored procedurejaveed_mhd
 
Idempotent filter in Mule
Idempotent filter in MuleIdempotent filter in Mule
Idempotent filter in MuleF K
 
Initialize database in Mule part2
Initialize database in Mule part2Initialize database in Mule part2
Initialize database in Mule part2Anirban Sen Chowdhary
 
Mule batch
Mule batchMule batch
Mule batchGandham38
 
Mule architecture
Mule   architectureMule   architecture
Mule architecturehimajareddys
 
Overview of Mule
Overview of MuleOverview of Mule
Overview of Mulemdfkhan625
 

Andere mochten auch (20)

Mule anypoint workday-devkit
Mule  anypoint workday-devkitMule  anypoint workday-devkit
Mule anypoint workday-devkit
 
Mule Esb
Mule EsbMule Esb
Mule Esb
 
Mule oracle connectors
Mule oracle connectorsMule oracle connectors
Mule oracle connectors
 
MuleEsb Complete integration and middleware solution
MuleEsb Complete integration and middleware solutionMuleEsb Complete integration and middleware solution
MuleEsb Complete integration and middleware solution
 
Mule execution
Mule executionMule execution
Mule execution
 
Mule esb data weave multi input data
Mule esb data weave multi input dataMule esb data weave multi input data
Mule esb data weave multi input data
 
Mule Maven Plugin
Mule Maven PluginMule Maven Plugin
Mule Maven Plugin
 
Deploying and running in mule standalone
Deploying and running in mule standaloneDeploying and running in mule standalone
Deploying and running in mule standalone
 
Validating a soap request in mule
Validating a soap request in mule Validating a soap request in mule
Validating a soap request in mule
 
Mule Tcat server
Mule  Tcat serverMule  Tcat server
Mule Tcat server
 
Mule saas
Mule  saasMule  saas
Mule saas
 
Mule new jdbc component
Mule new jdbc componentMule new jdbc component
Mule new jdbc component
 
For each component in mule demo
For each component in mule demoFor each component in mule demo
For each component in mule demo
 
Mule with stored procedure
Mule with stored procedureMule with stored procedure
Mule with stored procedure
 
Idempotent filter in Mule
Idempotent filter in MuleIdempotent filter in Mule
Idempotent filter in Mule
 
Initialize database in Mule part2
Initialize database in Mule part2Initialize database in Mule part2
Initialize database in Mule part2
 
Mule cloud hub
Mule  cloud hubMule  cloud hub
Mule cloud hub
 
Mule batch
Mule batchMule batch
Mule batch
 
Mule architecture
Mule   architectureMule   architecture
Mule architecture
 
Overview of Mule
Overview of MuleOverview of Mule
Overview of Mule
 

Ähnlich wie Xml to xml transformation in mule

Xml transform
Xml transformXml transform
Xml transformSon Nguyen
 
Xml to xml transformation
Xml to xml transformationXml to xml transformation
Xml to xml transformationSon Nguyen
 
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 mdfkhan625
 
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 AbdulImrankhan7
 
Xslt in mule
Xslt in muleXslt in mule
Xslt in muleShahid Shaik
 
Xslt in mule
Xslt in muleXslt in mule
Xslt in muleHasan Syed
 
Transformation xmltoobjectesb
Transformation xmltoobjectesbTransformation xmltoobjectesb
Transformation xmltoobjectesbDavide Rapacciuolo
 
Xml toobjectesbtransform
Xml toobjectesbtransformXml toobjectesbtransform
Xml toobjectesbtransformDomenico Schiavone
 
Xml to xml transformation in mule
Xml to xml transformation in muleXml to xml transformation in mule
Xml to xml transformation in muleDomenico Schiavone
 
Transformation xmltoobjectesb
Transformation xmltoobjectesbTransformation xmltoobjectesb
Transformation xmltoobjectesbGermano Barba
 
Transformation xmltoobjectesb
Transformation xmltoobjectesbTransformation xmltoobjectesb
Transformation xmltoobjectesbAntonio Pellegrino
 
Transformation xmltoobjectesb
Transformation xmltoobjectesbTransformation xmltoobjectesb
Transformation xmltoobjectesbDavide Rapacciuolo
 
Transformation jsontojsonesb
Transformation jsontojsonesbTransformation jsontojsonesb
Transformation jsontojsonesbAntonio Pellegrino
 

Ähnlich wie Xml to xml transformation in mule (20)

Xml transform
Xml transformXml transform
Xml transform
 
Xml to xml transformation
Xml to xml transformationXml to xml transformation
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 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 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
 
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
 
Transformation xmltoobjectesb
Transformation xmltoobjectesbTransformation xmltoobjectesb
Transformation xmltoobjectesb
 
Xml toobjectesbtransform
Xml toobjectesbtransformXml toobjectesbtransform
Xml toobjectesbtransform
 
Xml to xml transformation in mule
Xml to xml transformation in muleXml to xml transformation in mule
Xml to xml transformation in mule
 
Transformation xmltoobjectesb
Transformation xmltoobjectesbTransformation xmltoobjectesb
Transformation xmltoobjectesb
 
Transformation xmltoobjectesb
Transformation xmltoobjectesbTransformation xmltoobjectesb
Transformation xmltoobjectesb
 
Transformation xmltoobjectesb
Transformation xmltoobjectesbTransformation xmltoobjectesb
Transformation xmltoobjectesb
 
Transformation jsontojsonesb
Transformation jsontojsonesbTransformation jsontojsonesb
Transformation jsontojsonesb
 

Mehr von javeed_mhd

For each component in mule
For each component in muleFor each component in mule
For each component in mulejaveed_mhd
 
Filter expression in mule
Filter expression in muleFilter expression in mule
Filter expression in mulejaveed_mhd
 
File component in mule
File component in muleFile component in mule
File component in mulejaveed_mhd
 
Database component in mule
Database component in muleDatabase component in mule
Database component in mulejaveed_mhd
 
Choice component in mule
Choice component in muleChoice component in mule
Choice component in mulejaveed_mhd
 
Vm component in mule
Vm component in muleVm component in mule
Vm component in mulejaveed_mhd
 
Until successful component in mule
Until successful component in muleUntil successful component in mule
Until successful component in mulejaveed_mhd
 
Quartz component in mule
Quartz component in muleQuartz component in mule
Quartz component in mulejaveed_mhd
 
Mule management console installation
Mule management console installation Mule management console installation
Mule management console installation javeed_mhd
 
Mule esb made system integration easy
Mule esb made system integration easy Mule esb made system integration easy
Mule esb made system integration easy javeed_mhd
 
Message properties component in mule
Message properties component in muleMessage properties component in mule
Message properties component in mulejaveed_mhd
 
Junit in mule demo
Junit in mule demo Junit in mule demo
Junit in mule demo javeed_mhd
 
How to install sonarqube plugin in anypoint
How to install sonarqube plugin in anypoint How to install sonarqube plugin in anypoint
How to install sonarqube plugin in anypoint javeed_mhd
 
How to commit a project in svn using svn plugin in anypointstudio
How to commit a project in svn using svn plugin in anypointstudioHow to commit a project in svn using svn plugin in anypointstudio
How to commit a project in svn using svn plugin in anypointstudiojaveed_mhd
 
Mapping and listing with mule
Mapping and listing with mule Mapping and listing with mule
Mapping and listing with mule javeed_mhd
 
Mule any point exchange
Mule any point exchangeMule any point exchange
Mule any point exchangejaveed_mhd
 
Mule esb api layer
Mule esb api layer Mule esb api layer
Mule esb api layer javeed_mhd
 
Mule esb stripe
Mule esb stripeMule esb stripe
Mule esb stripejaveed_mhd
 
Deploying and running in mule standalone
Deploying and running in mule standaloneDeploying and running in mule standalone
Deploying and running in mule standalonejaveed_mhd
 
Presentation
PresentationPresentation
Presentationjaveed_mhd
 

Mehr von javeed_mhd (20)

For each component in mule
For each component in muleFor each component in mule
For each component in mule
 
Filter expression in mule
Filter expression in muleFilter expression in mule
Filter expression in mule
 
File component in mule
File component in muleFile component in mule
File component in mule
 
Database component in mule
Database component in muleDatabase component in mule
Database component in mule
 
Choice component in mule
Choice component in muleChoice component in mule
Choice component in mule
 
Vm component in mule
Vm component in muleVm component in mule
Vm component in mule
 
Until successful component in mule
Until successful component in muleUntil successful component in mule
Until successful component in mule
 
Quartz component in mule
Quartz component in muleQuartz component in mule
Quartz component in mule
 
Mule management console installation
Mule management console installation Mule management console installation
Mule management console installation
 
Mule esb made system integration easy
Mule esb made system integration easy Mule esb made system integration easy
Mule esb made system integration easy
 
Message properties component in mule
Message properties component in muleMessage properties component in mule
Message properties component in mule
 
Junit in mule demo
Junit in mule demo Junit in mule demo
Junit in mule demo
 
How to install sonarqube plugin in anypoint
How to install sonarqube plugin in anypoint How to install sonarqube plugin in anypoint
How to install sonarqube plugin in anypoint
 
How to commit a project in svn using svn plugin in anypointstudio
How to commit a project in svn using svn plugin in anypointstudioHow to commit a project in svn using svn plugin in anypointstudio
How to commit a project in svn using svn plugin in anypointstudio
 
Mapping and listing with mule
Mapping and listing with mule Mapping and listing with mule
Mapping and listing with mule
 
Mule any point exchange
Mule any point exchangeMule any point exchange
Mule any point exchange
 
Mule esb api layer
Mule esb api layer Mule esb api layer
Mule esb api layer
 
Mule esb stripe
Mule esb stripeMule esb stripe
Mule esb stripe
 
Deploying and running in mule standalone
Deploying and running in mule standaloneDeploying and running in mule standalone
Deploying and running in mule standalone
 
Presentation
PresentationPresentation
Presentation
 

KĂŒrzlich hochgeladen

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel AraĂșjo
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 

KĂŒrzlich hochgeladen (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

Xml to xml transformation in mule

  • 1. XML to XML transformation in Mule
  • 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>Anirban Sen Chowdhary</name> <id>37</id> <designation>Director</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. How to transform or modify a XML payload in Mule ??
  • 7. 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 :-
  • 8. 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. The XSL file here named as Transform.xsl should be kept under src/main/resources folder and the xsl file will be as following :-
  • 9. The graphical representation of this flow will be as follows :-
  • 10. Testing our application 


  • 11. 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.
  • 12. once we click the send button we will get the following response in our client from our Mule flow :-
  • 14. 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. I hope you liked this !!!
  • 15. Hope you enjoyed the simple yet an amazing trick in Mule You can also find this post here :- http://bushorn.com/xml-to-xml- transformation-in-mule/