title: How to print svg in java?
body: <pre><code>&lt;?xml version="1.0" standalone="no"?&gt;
  &lt;!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
    "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"&gt;
  &lt;svg width="12cm" height="12cm" viewBox="0 0 1000 1000"
       xmlns="http://www.w3.org/2000/svg" version="1.1"&gt;
       &lt;line x1="100" y1="100" x2="500" y2="200" stroke="red" stroke-width="5" /&gt;
       &lt;circle cx="200" cy="100" r="50" stroke="black" stroke-width="3" /&gt; 
  &lt;/svg&gt;
  </code></pre>
  
  <p>I want to print these svg codes in java. I know I should use print method to do this, but every time I tried to compile the java program I would get a bunch of errors. Please help me. Here are my codes:</p>
  
  <pre><code>class svg{
      puclic static void main(String[] args){
          System.out.print("
              &lt;?xml version=\"1.0\" standalone=\"no\"?&gt;
              &lt;!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" 
              \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\"&gt;
              &lt;svg width=\"12cm\" height=\"12cm\" viewBox=\"0 0 1000 1000\"
              xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\"&gt;
              &lt;line x1=\"100\" y1=\"100\" x2=\"500\" y2=\"200\" stroke=\"red\" stroke-width=\"5\" /&gt;
              &lt;circle cx=\"200\" cy=\"100\" r=\"50\" stroke=\"black\" stroke-width=\"3\" /&gt; 
              &lt;/svg&gt;
              ")
      }
  }
  </code></pre>