title: Reading SVG path in Java
body: <p>I'm reading text files in java where I use the scanner class to read text in SVG format. I have seen answers that recommend Batik. I would like to know how to use Batik only on the path data in SVG format. I want to evaluate the path and extract points that would trace out the path. Can I do this using Batik without having to evaluate the entire file in Batik?</p>
  
  <p>I was trying to create my own path parser but I don't have enough time or skill to do so. I am evaluating tags in SVG format by splitting them using <code>&lt; and /&gt;</code> and I am stuck on evaluating the d attribute of paths. Here's an example of a path that I need to evaluate:</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  
  &lt;svg width="10000" height="1000"&gt;
  &lt;path id="square" fill="#0000FF" 
  d="M351.3,251 l-3.1-2.2c-0.3-0.2-0.3-0.5-0.1-0.8l2.2-3.1c0.2-0.3,0.5-0.3,0.8-0.1l3.1,2.2
  c0.3,0.2,0.3,0.5,0.1,0.8l-2.2,3.1C355,251.1,354.6,251.2,354.3,251z"/&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I need the points along this path.</p>