How to preserving XML tag string formats in variables?

Keith Clarke keith.clarke at clarkeandclarke.co.uk
Sun May 22 02:27:53 EDT 2011


Thanks for flagging this up but I have no problem with linefeeds - and the client platform is a red herring when dealing with standards-based XML. But I did a bit of digging - just to ensure that this won't bite me later...

LiveCode's 'return' (or 'cr' for short) provides the correct 'linefeed' XML end-of-line character. http://www.w3schools.com/xmL/xml_syntax.asp ...and fortunately HTML is even more flexible http://www.w3.org/TR/html401/struct/text.html#h-9.3.2

So, 'return' or 'cr' is the safe mechanism for LiveCode to generate text file new line, end-of-line, line break (I think that seeded all the relevant search terms for future reference!) when working with XML or HTML files that are destined for internet usage. (I think that sentence seeded all the relevant search terms for future reference!)
Best,
Keith..  
 
On 22 May 2011, at 02:30, Jim Ault wrote:

> Look in the LC dictionary under CR constant for a detailed explanation, and also the constants LF, CRLF
> 
> This is always confusing to people who are not used to cross-platform and web server programming.
> 
> Hope this helps.
> 
> On May 21, 2011, at 2:45 PM, Bob Sneidar wrote:
> 
>> Is it important that return and cr are two different things, depending on the OS? I was told that return means cr/lf on a Mac system and maybe windows, while Linux/Unix systems interpret it as something different. CR is a single carriage return. Do I have this right? Does this matter to your particular application?
>> 
> 
> Jim Ault
> Las Vegas
> 
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list