I use batik for drawing svg, and save it. That work.
But now i try to load my svg file and add somthing.
I use this fonction for load my svg file
private static SVGDocument loadSVGDocument(String uri) {
String parser = XMLResourceDescriptor.getXMLParserClassName();
SAXSVGDocumentFactory factory = new SAXSVGDocumentFactory(parser);
SVGDocument svgDocument = null;
try {
//svgDocument = factory.createSVGDocument(IMAGE_SVG);
svgDocument = factory.createSVGDocument(uri);
} catch (IOException e) {
System.out.println(e.getMessage());
}
return svgDocument;
}
and this for have SVGGraphics2D
SVGDocument svgDocument = loadSVGDocument(TEST_SVG);
SVGGraphics2D g = new SVGGraphics2D(svgDocument);
When i debug my SVGDocument have all children and attribut null And when i generate image, is empty and size is 400x400
Where is problem when i load my SVG file?