Simple/Direct way of contructing a HTML string in Java

Posted by das_weezul on Stack Overflow See other posts from Stack Overflow or by das_weezul
Published on 2010-04-20T20:43:37Z Indexed on 2010/04/20 20:53 UTC
Read the original article Hit count: 199

Filed under:
|
|
|

In python I can construct a HTML string without worrying about escaping special characters like < or " by simply enclosing the string in triple quotes like:

html_string = """
<html>
<body>
<p>My text with "quotes" and whatnot!<p>
</body>
</html>
"""

Is there a similar way to do this in Java?

© Stack Overflow or respective owner

Related posts about java

Related posts about string