Hello Everyone, I am trying to create new SVG document by parsing ByteArray as Stream: 1. DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); 2. SVGDocument svgDocument = (SVGDocument)builder.parse(new ByteArrayInputStream(svgStream.toByteArray()));
This method fails on 2nd line: java.lang.ClassCastException: org.apache.xerces.dom.DeferredDocumentImpl cannot be cast to org.w3c.dom.svg.SVGDocument at ... If SVGDOMImplementation is used, it offers only to create new document, not to parsing existing one: SVGDocument d = (SVGDocument) SVGDOMImplementation.getDOMImplementation().createDocument(SVGNS, "svg", null); Is there any possibility to create SVG document from existing XML code? Jan --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
