G Georg Member Licensed User Longtime User Aug 6, 2008 #1 I need long strings to put it in a variable p.E. Kopf = "<?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://earth.google.com/kml/2.1"> <Document> <Placemark> <name>CDATA example</name> <description>" that doesn't work, I know. Is there a chance to do it like in Perl $kopf = qq~ <?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://earth.google.com/kml/2.1"> <Document> <Placemark> <name>CDATA example</name> <description> ~; Thanks for help
I need long strings to put it in a variable p.E. Kopf = "<?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://earth.google.com/kml/2.1"> <Document> <Placemark> <name>CDATA example</name> <description>" that doesn't work, I know. Is there a chance to do it like in Perl $kopf = qq~ <?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://earth.google.com/kml/2.1"> <Document> <Placemark> <name>CDATA example</name> <description> ~; Thanks for help
Cableguy Expert Licensed User Longtime User Aug 6, 2008 #2 You have quotes inside your string... So when you have A="this is a "Quote"" you should use A= "This is " & Chr(34) & "Quote" & chr(34) Kopf = "<?xml version=" & Chr(34) & "1.0" & Chr(34) & "encoding=" & Chr(34) & "UTF-8" & Chr(34) & "?>" & crlf & - This forces the line break "<kml xmlns=" & Chr(34) & "http://earth.google.com/kml/2.1" & Chr(34) & ">" & crlf & "<Document>" & crlf & "<Placemark>" & crlf & "<name>CDATA example</name>" & crlf & "<description>" Last edited: Aug 6, 2008
You have quotes inside your string... So when you have A="this is a "Quote"" you should use A= "This is " & Chr(34) & "Quote" & chr(34) Kopf = "<?xml version=" & Chr(34) & "1.0" & Chr(34) & "encoding=" & Chr(34) & "UTF-8" & Chr(34) & "?>" & crlf & - This forces the line break "<kml xmlns=" & Chr(34) & "http://earth.google.com/kml/2.1" & Chr(34) & ">" & crlf & "<Document>" & crlf & "<Placemark>" & crlf & "<name>CDATA example</name>" & crlf & "<description>"
agraham Expert Licensed User Longtime User Aug 6, 2008 #3 When I needed a bit of HTML and complained about all the Chr(34)s member badkarma told me in this post http://www.b4x.com/forum/10707-post16.html in this thread http://www.b4x.com/forum/questions-help-needed/1962-hyperlinks-2.html that you can use single quotes instead, this makes the code much more readable.
When I needed a bit of HTML and complained about all the Chr(34)s member badkarma told me in this post http://www.b4x.com/forum/10707-post16.html in this thread http://www.b4x.com/forum/questions-help-needed/1962-hyperlinks-2.html that you can use single quotes instead, this makes the code much more readable.