Is there a way to convert an XMLTYPE datatype in Oracle to text in Appian?

Hi all,
Is there a way to convert an XMLTYPE datatype in Oracle to text in Appian?

Any inputs are highly appreciated!!!!!!

OriginalPostID-180647

OriginalPostID-180647

  Discussion posts and replies are publicly visible

  • Hi Phanibabu -
    Are you looking to convert the entire contents of an XMLTYPE value, (including tags), or are you interested in obtaining certain values contained within the XMLTYPE?

    Either way, it's likely best to manage within Oracle the transformation from XMLTYPE to an Oracle data type available for use in an Appian XSD.

    See the list Oracle datatypes available for Appian XSDs here:
    forum.appian.com/.../Custom_Data_Types_from_XSD.html

    An XMLTYPE value cast as text could be very long. It wouldn't be ideal to regularly import all that data into process without a compelling reason. Further, you'd need to be certain that it would not exceed the size of your text column.
  • +1
    Certified Lead Developer
    Hi Phani,
    You can create a view in oracle DB where you can convert xml column values using getStringVal() function and then query that view in Appian and map values to Appian object using torecord() function.
    I am not sure but you MAY directly use getStringVal() in query database smart service and map it to a text output. But as mentioned by Rob - keep an eye on your text column in Appian which will hold the converted value.
  • I am trying to merge a couple of column values into a single row in Oracle.
    I'm able to achieve it. However, when I try to create a view, it returns the type of this column to "XMLTYPE" as I used XmlAgg function.
    And there is a hard limit of 4000 characters while using it.
    Also, not sure of how can I map an XMLTYPE into a meaningful type in Appian.

    Any inputs are appreciated!!!