format string like xml attribute
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!
How about that?
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
I used straight double quote which is standard ASCII which is what XML wants AFAIK.
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 ;)
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 :
)
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 \.
Oh, so [text] gets the quotes right ! THough it doens't output them right... but that's another problem maybe