Published on InterSystems Developer Community (https://community.intersystems.com)

Home > How to Concatenate Strings to create large string which contains"" inside in object script

Question
Sreevani Goli · Jan 26, 2022

How to Concatenate Strings to create large string which contains"" inside in object script

Hi Developers,

I need to construct a string as xml which consists of "" in it.  As example below

set teststr ="<book id="bk105"><author type="old">Corets, Eva</author><title>The Sundered Grail</title><genre>Fantasy</genre></book>"

giving error in the area where " in middle of the string (highlighted in bold)

 

Could anybody suggest to me, how to construct a static string in object scripts with " in it?

#Caché
Product version: Caché 2017.1

Source URL:https://community.intersystems.com/post/how-concatenate-strings-create-large-string-which-contains-inside-object-script