As @Javier suggested in the comments, checkout Graphviz. Specifically:
Write XSLT to map from your XML to
DotML, an XML representation of the DOT graph description language. You can validate DotML against the DotML schema.
Run generate-svg-graphics.bash, which uses generate-svg-graphics.xsl, to convert from DotML to SVG.