I want to convert XML response into CDT format.

I am having process model which scheduled to run after every hour and get XML response from external system and storing into text type pv.

XML data in nested CDT format.

Now, We want to read that XML file into Appian CDT. For reference i am giving below XML response.

<variable type="InputBO">
<paymentInfo type="PaymentBO">
<operationType type="String">CAPTURE</operationType>
<channelId type="String">AAA</channelId>
<paymentTypeCode type="String">BBB</paymentTypeCode>
<referenceNumber type="String">ABCD145891</referenceNumber>
<paymentAmount type="Decimal">515.0</paymentAmount>
<paymentCurrency type="String">GBP</paymentCurrency>
<paymentCardDetails type="PaymentCardDetailsBO">
</paymentInfo>
</variable>

Could you please help me to achieve this task? Thanks for your support in advance.(Appian version 18.1)

  Discussion posts and replies are publicly visible

Parents
  • Hi vinodt,

    As far as I know you can use torecord() function i.e,torecord(pv!nameXMLData,type) here type refers to type: (Any Type) Enter a variable (process variable or activity class) that has the same data type that you want the XML to be converted into..
    On a note :The XML given for the xml parameter must be valid for the XSD that was used to create the target data type.

    Thanks,
    ravalik
Reply
  • Hi vinodt,

    As far as I know you can use torecord() function i.e,torecord(pv!nameXMLData,type) here type refers to type: (Any Type) Enter a variable (process variable or activity class) that has the same data type that you want the XML to be converted into..
    On a note :The XML given for the xml parameter must be valid for the XSD that was used to create the target data type.

    Thanks,
    ravalik
Children
No Data