Enter your keyword

post

Convert XML to String in OSB : fn-bea:serialize

Sometime it is required to convert XML to string format. OSB allows us to convert XML to string using OSB inbuilt function.

You can use the fn-bea:serialize() function if you need to represent an XML document as a string instead of as an XML element.

For example, you may want to exchange an XML document through an EJB interface and the EJB method takes String as argument. The function has the following signature:

fn-bea:serialize($input as item())

Let’s see the example:

Suppose you have an variable called result in the OSB that contained XML, and you want to convert the same into string, then you can use the following expression in Assign activity:

Let’s run the example and see the output of Assign variable:

See the xmlstring variable value.

Some Toughts (3)

  1. added on 10 Jun, 2019
    Reply

    This comment has been removed by a blog administrator.

  2. added on 18 Jul, 2019
    Reply

Leave a Reply

Your email address will not be published.