I am using Apache Batik to generate SVG graphics.
I do
Document document = domImpl.createDocument(namespaceURI, "svg", null); SVGGraphics2D g