format string like xml attribute


    Dec 04 2013 | 11:56 am
    Hi, does anybody know how to format a string in Max like this?
    startSample="1320200"
    I tried with combine, sprint, text object… All the time, the quotes are cleared.
    Thank you very much for hints!

    • Dec 04 2013 | 7:19 pm
      How about that?
    • Dec 04 2013 | 9:56 pm
      Hi Emmanuel, thank you very much. Funny, that you are using different quotes than me. I didn't know that these "other" quotes exist.
      I tried to use sprintf like this: sprintf startSample"%d" - in this way the quotes are deleted in object creation. Your quotes ” are different (in this forum, the font seems to be the same for both types) - they stay there. I'm only not sure, if they're accepted by XML parsers. I'm going to try it.
      Thanks, Martin
    • Dec 05 2013 | 12:08 pm
      I used straight double quote which is standard ASCII which is what XML wants AFAIK.
    • Dec 05 2013 | 2:47 pm
      Normally I use shift+2 to get quotes on my (german) MB Pro keyboard. These quotes disappear after object creation. I have to use alt+2 to get your type of quotes, which stay in the object...Strange ;)
    • Dec 05 2013 | 3:43 pm
      Emmanuel, a hypertext research for "straight double" doesn't show any result on the Wikipedia page. Are you refering to the "quotation mark" (the first glyph in the table, code U+0022) ? If i copy paste that glyphe from wikipedia into replacing your pasted patcher quotes, they disappear... those seem to be the standard Max quotes, which are difficult to output from a sprintf box (best i succeeded :
      )
    • Dec 05 2013 | 5:08 pm
      well my bad… I must have fall asleep on the option key while doing that ;-) You have to escape the straight double quotes with a \.
    • Dec 05 2013 | 11:24 pm
      Oh, so [text] gets the quotes right ! THough it doens't output them right... but that's another problem maybe