Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikhalmar
Creator
Creator

Extra double quotes when store as TXT

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

5 Replies
giakoum
Partner - Master II
Partner - Master II

replace double quotes with Chr(34)

LET vXML =

'<?xml version=' & chr(34) & '1......

giakoum
Partner - Master II
Partner - Master II

better solution

remove txt :

STORE Test INTO [Test.xml];

avinashelite

Due to the text format conversion for the space its adding the "" with it...

store directly as .xml without (txt)

jonathandienst
Partner - Champion III
Partner - Champion III

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.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
qlikhalmar
Creator
Creator
Author

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.