How to print double quotes

Hi!
I have to print an html stuff which contains double quotes, how to do that in processing??
(I have searched in processing reference but there doesn’t say anything about that)
I have to print this text:

<?xml version="1.0" encoding="UTF-8"?>
2 Likes

Replace all " w/ \": :sunglasses:

static final String HTML = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";

void setup() {
  println(HTML);
  exit();
}
2 Likes

Replace all "

with

\"

1 Like

Processing documentation touches on the subject of “escape sequences” here:
https://processing.org/reference/String.html

Oracle Java Documentation discusses “escape sequences”:
https://docs.oracle.com/javase/tutorial/java/data/characters.html

I had to use these in this example:

:slight_smile:

3 Likes