Created
May 3, 2021 18:13
-
-
Save jeffscottbrown/a82dabc95f13cafa2581088b831d21a6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ~ $ cat htmlTest.groovy | |
| import groovy.xml.MarkupBuilder | |
| def writer = new StringWriter() | |
| def markup = new MarkupBuilder(writer) | |
| markup.html { | |
| body { | |
| div { | |
| h1 "Test Page" | |
| } | |
| } | |
| } | |
| println writer | |
| ~ $ | |
| ~ $ groovy htmlTest | |
| <html> | |
| <body> | |
| <div> | |
| <h1>Test Page</h1> | |
| </div> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment