Difference Between Parse XML And Render XML Activity In TIBCO

While developing processes in TIBCO designer, Parse XML and Render XML activities are widely used. There is often a question in minds of people who are new to TIBCO development that “What is the difference between Parse XML and Render XML activity?”.

Parse XML task is used when you have an XML document stored in a string or binary field. This activity produces a tree representation of the XML that can be used by subsequent activities in the flow.

On the other hand, Render XML activity in TIBCO designer does opposite to Parse XML activity; i.e. it takes an XML tree for a specified schema and converts it to a string or binary element that contains the XML document.

Example of Using Parse XML and Render XML activity in TIBCO designer:

In our example we will use both Parse XML and Render XML activities in a process. We have a XML file stored in a text file with the contents as below:

<?xml version=”1.0″ encoding=”utf-8″?>
<Employee
xmlns:xs=”http://www.w3.org/2001/XMLSchema”
xmlns=”http://www.tibco.com/schemas/XMLTest/Schemas/Schema.xsd”
targetNamespace=”http://www.tibco.com/schemas/XMLTest/Schemas/Schema.xsd”>
<EmployeeDetails>
<Name>Ajmal</Name>
<Age>26</Age>
<DOB>08-08-1987</DOB>
</EmployeeDetails>
</Employee>

We create XML Schema (XSD) in our project Scheme folder for this XML file as shown below:

XML Schema

Recommended:   How to Create XSD in TIBCO BW

We create a new process ParseAndRender with both ParseXML and RenderXML activities as shown below:

parse and render xml process

 

Read File activity is used to read the XML string data from a text file Employee.xml. In the Parse XML activity configuration, we specify text as Input Style.

parse xml configuration

 

In ParseXML input tab, we map Text Content of Read File activity to its XMLString field.

parse xml input

 

In Output editor tab of Parse XML activity configuration, we select XML Schema (XSD) which we created as Employee.xsd for our example project.

parse xml output editor

 

After choosing this xml scheme in output editor, we can see that output of Parse XML activity is based on this schema as shown in its Output tab:

parse xml output

In Render XML activity configuration, select Text as output style as shown below:

render xml configuration

In Input Editor tab of Render XML activity, select Employee.xsd XML schema.

render xml input editor

In Render XML input, map output of Parse XML by using “Make a copy of” radio button. This will map Employee details to relevant XML output fields of Render XML activity.

render xml input make a copy of

Output of Render XML activity is a XML String containing XML data in text format.

render xml output

Now we are done with configuration of all process activities. Its time to test the process.

Load the process in Designer Tester and observe the output of Parse XML and Render XML activities.  As shown below, ParseXML activity output is showing output as XML structured data based on the text read from file by Read File activity.

tester parse xml output data

 

And below you can see that RenderXML activity has output as a string with that XML data in it.

tester render xml output

 

Ajmal Abbasi

Ajmal Hussain Abbasi is Integration Consultant By Profession with 13+ years experience in Integration domain mainly with TIBCO products. He has extensive practical knowledge of TIBCO Business Works, TIBCO Cloud, TIBCO Flogo, TIBCO Mashery, TIBCO Spotfire, EMS and TIBCO ActiveSpaces. He has worked on a number of highly critical integration projects in various sectors by using his skills in TIBCO Flogo, TIBCO API Management (Mashery), TCI, Tibco Designer, TIBCO Business Studio, Adapters, TIBCO EMS, RV, Administrator, TIBCO BE, TIBCO ActiveSpaces etc. Ajmal Abbasi has experience with MuleSoft ESB as well. Ajmal Abbasi is also experienced in the area of API Management particularly with WSO2 API management platforms. Ajmal Abbasi is also experienced in developing solutions using Core Java and J2EE Technologies. You can contact Ajmal Abbasi for Consultancy, Technical Assistance and Technical Discussions.

More Posts - Website - Facebook - LinkedIn - YouTube

9 thoughts on “Difference Between Parse XML And Render XML Activity In TIBCO

  1. Ahmad Syahruddin

    How can i get data in ParseXML into group of JDBC Update. I’ve succeeded load data into PArseXML, but failed when insert those data into table.

    The Structure :
    START – READFILE – PARSEXML – (JDBC UPDATE or WRITE FILE) – END . in paranthesis means GROUP OF LOOP.

    Thanks for advise

    Reply
  2. Pravin

    I am doing the same process without render xml. I am just calculating average marks for all students and i am able to receive data from xml file but while calculating average, i am not able to get all data from parse xml, its giving up the first record alone.

    Reply
  3. a suresh kumar

    Hi sir ,

    Can we pass xml data to parse xml directly with out using read actvity? . if there is possible, could you please give a suggestion ” how is it”

    Thanks,
    Suresh

    Reply
  4. smit

    I am doing the same process without render xml. I am just calculating average marks for all students and i am able to receive data from xml file but while calculating average, i am not able to get all data from parse xml, its giving up the first record alone.

    Reply
  5. saurabh

    i’m getting an error.
    TIBCO-BW-PALETTE-ADBPLUGIN-300001. DataEventPoller Schema {0} starts polling message
    plz guide me here to solve this .
    Thanks
    smit

    Reply
  6. Tibco User

    Hi Ajmal,
    I am new to Tibco, I have an XML file which have element having name attribute eg,

    6

    How can I get value ‘6’ from this file.

    Please help.

    Thanks in advance.

    Reply
  7. Nimisha Tiwari

    I’m having an error while parsing this exact file, it says xml data is not well formed.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *