How to preserving XML tag string formats in variables?

Keith Clarke keith.clarke at clarkeandclarke.co.uk
Sat May 21 10:12:20 EDT 2011


Hi folks,
I'm experimenting with scripting the building of a POST message. So, I'm creating a set of lines that take the form "<opening_tag_string>" & tVariable & "</closing_tag_string>" and using a repeat loop to build each component of each lines into a variable tMessage. 

When I use 'add return & "opening–tag–string" & tVariable after tMessage' to create a partial XML node statement, I get what I would expect to see in the message box when I put tMessage. 

However, when I attempt to 'add return & "opening–tag–string" & tVariable & "closing_tag_string" after tMessage' to create the full statement, the opening and closing tag strings disappear and I'm left with just the list of tVariable in tMessage.

I guess there is some wrapping or encoding that I need to apply to the tag strings to preserve them inside the variable, but I can't seem to find anything in the docs or the lists - I'm obviously using the wrong search terms.

Any clues gratefully received.
Best,
Keith..



More information about the use-livecode mailing list