I want to isolate an element from a svg file and get the code of this element (<svg><path/>...</svg>
). I try with Batik, but I don't find how to transform a SVGOMSymbolElement into String.
String parser = XMLResourceDescriptor.getXMLParserClassName();
SAXSVGDocumentFactory f = new SAXSVGDocumentFactory(parser);
Document doc = f.createDocument("file.svg");
Element element = doc.getElementById("my-id");
Aucun commentaire:
Enregistrer un commentaire