How to generate xml document with dynamic data

Hi,
I have a scenario to generate XML document with dynamic data .Need to take data through an action then automatically required XML document should be generated

Could you please help me on this

OriginalPostID-255853

  Discussion posts and replies are publicly visible

Parents Reply
  • toxml(
        value:a!map(
                    one:rule!ZMK_GetDEMANDEByIddemande(1),
                    two: now()
                 ),
         format:true,
         name:"root",
         namespace:"root2"
    )

    and the result is 

    "<n1:root xmlns:n1="root2" xmlns:a="http://www.appian.com/ae/types/2009" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <one xmlns:n2="urn:com:appian:recordtype:datatype" xsi:type="n2:4d150a11-17bc-4370-b1d6-5db2f05a6bda"> <iddemande xsi:type="xsd:int" uuid="f7dfcec7-9a6f-44f2-ac39-651317a0cf9d">1</iddemande> <statut xsi:type="xsd:string" uuid="f41f320f-ff4a-4077-a59b-75960d9310c7">NEW</statut> <dateStatut xsi:type="xsd:string" uuid="76b39c40-b653-44e6-901d-6697f1281513" /> <statusId xsi:nil="true" xsi:type="xsd:int" uuid="76534201-8a54-4fc0-a951-0459d7d690d8" /> <idremise xsi:nil="true" xsi:type="xsd:int" uuid="63dd9e79-b738-40d1-af3b-a452e470b4e6" /> <topUrgence xsi:nil="true" xsi:type="xsd:boolean" uuid="0bbc73b0-88dd-4bbb-8f6f-68fe62e72f90" /> <createdBy a:id="" xsi:type="a:User" uuid="c4af67cd-1d10-44ce-9b92-3000ffe0a602" /> <createdOn xsi:nil="true" xsi:type="xsd:dateTime" uuid="b173133d-de4d-4c94-9dbc-5667a57a507a" /> <modifiedBy a:id="" xsi:type="a:User" uuid="1692f2fd-e43b-46ae-beb3-2b4fb9cb88ac" /> <modifiedOn xsi:nil="true" xsi:type="xsd:dateTime" uuid="11eff0d9-0aa6-44ff-b0ab-fdb9cc98397e" /> </one> <two xsi:type="xsd:dateTime">2024-02-27T14:36:20.060Z</two> </n1:root>

    With no formatting , UUID instead of field names and still have the xmlns and xsi2:type metadata...

Children