Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a problem when store a string as txt.
I have a variable with XML content inside. When I store this, via a table, to txt, QlikView add after every double quote an extra double quote. That makes that my generated file not usefull anymore. And at the begin and the end QlikView add also a double quote.
Attached my simpel example.
Thanks, Halmar
replace double quotes with Chr(34)
LET vXML =
'<?xml version=' & chr(34) & '1......
better solution
remove txt :
STORE Test INTO [Test.xml];
Due to the text format conversion for the space its adding the "" with it...
store directly as .xml without (txt)
STORE .... (txt) stores a comma separated file with normal quoting rules (msq). Because the file only contains a single 'field', and this field contains commas and quotes, the field is quoted (double quotes at the start and end), and doubling up internal double quotes to 'escape' them.
You can change the delimiter, but I don't think you can change the quoting rules to no quotes. XML will accept single quotes, so you could try using single quotes like:
LET vXML = '<?xml version=''1.0'' encoding=''utf-8'' ?>' & CHR(10) & '
<configuration>' & CHR(10) & '
<configSections>' & CHR(10) & '
<sectionGroup name=''applicationSettings'' .....
Note that ''1'' is a 1 surrounded with two single quotes on each side to escape the single quote and is less complicated than embedding chr(x) statements.
Hi Ioannis,
Thanks for your response.
This is not working because QlikView now adds the XML-header to the generated XML.
The trick with chr(34) is also not working since the extra quotes are added during the store statement.