16
Views
3
Comments
Solved
[XML Records] [XML Records] XML to recordlist with CDATA
Forge component by Afonso Carvalho
44
Published on 25 Nov 2019
Application Type
Traditional Web

Referring to the post, https://www.outsystems.com/forums/discussion/57528/xml-records/, I am unable to parse the value from the xml to recordlist as it contains the CDATA. Any value before the CDATA can be parsed. Anything inside of CDATA and onwards returned empty string.

When i removed the CDATA, i can get all the values.

forumsample.xml

Rank: #55
Solution

Hi WeiWei,


What you can do is converting the BinaryData to Text, apply Regex to remove the CDATA tags, convert Text again to Binary and use this CDATA-free binary to convert from XML to a RecordList.


Regards,
João

Rank: #5351

By removing CDATA tag, will it render the base64 binary content inside the <body></body> invalid? The base64 is actually an embedded pdf converted to binary.


Actually I need to take out the content of the base64 file inside of the <body></body> tag and store into the entity.

Rank: #5351

Hi Joao


I took your suggestion and tested it to work. 

I wonder will Text Replace work in this case too?