Skip to main content
July 27, 2021
Question

Trying to get the XML document data as a text for the rule input

  • July 27, 2021
  • 1 reply
  • 1 view

Hello,

I have a requirement where I want to use the body present in the XML document as text. And use that text as the rule input value.

Is there any way to achieve this?

Thanks

1 reply

acaciob0002
July 27, 2021

Hi Atul,

You could try to use the function xpathdocument(docId, expression, prefix)

Check the sample below:

If you need the whole node:

xpathdocument(addHereAXMLDocId,"ns:root/node","http://www.appian.com/ae/types/2009" )

If you need just the text of one field:

xpathdocument(addHereAXMLDocId,"ns:root/node/text()","http://www.appian.com/ae/types/2009" )

The prefix that I added in the sample (www.appian.com/.../2009) is not mandatory and should be used or not according to your XML input file.

Hope this helps you to achieve your goal.

Regards,

Acacio B