hello, I am stucked in the process of creating a JSVGCanvas from a SVG XML
content coming from an input stream.

What is the best practice?

Here is the way I do that:

DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();

DocumentBuilder builder = factory.newDocumentBuilder();

String xmlDocument = remoteEngine.getSvgDocument();

System.out.println(xmlDocument);

InputStream inStream = new ByteArrayInputStream(xmlDocument.getBytes());

return builder.parse(inStream);


I get into a ClassCastEexception when batik tries to narrow the document to
a SVG document (I suppose so...)

-- 
Dao Hodac

Reply via email to