Improve SVG export

It seems, SVG export working suboptimal.
For example, input like this:

digraph { A [label="", style="rounded", shape=box] }

results this SVG code:

...
<path fill="none" stroke="black" d="M42,-36C42,-36 12,-36 12,-36 6,-36 0,-30 0,-24 0,-24 0,-12 0,-12 0,-6 6,0 12,0 12,0 42,0 42,0 48,0 54,-6 54,-12 54,-12 54,-24 54,-24 54,-30 48,-36 42,-36"/>
...

while could be more clear and flexible:

...
<rect fill="none" stroke="black" x="0" y="-36" width="54" height="36" rx="12" ry="12"/>
...

Can you explain why the latter is better?

  1. This is more compact and need less space in file.
  2. This is more clear while looking into SVG file in text editor. SVG is a text format, so this is possible. At that, these files can be stored in git and other VCS with subsequent viewing of changes diff. In this case diff of the latter string is understandable, while in first is not so clear.
  3. This should improve SVG editing with vector graphic editors. For example, resizing and changing radius of rectangle with rounded corners is not the same, as these operations with set of curves.
  4. This is mathematically correct, unlike the current implementation. Bezier curves cannot exactly represent circle sectors.

Thanks. (1) was something like what I had guessed but the editing use case is an interesting scenario too.

The current SVG output makes no attempt to be minimal/compact. E.g. comments are included in the XML.