xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thomas.dewe...@kodak.com
Subject Re: Question about JSVGCanvas.setDocument()
Date Wed, 07 Apr 2010 12:36:41 GMT
Hi Peter,

Peter Hull <peterhull90@gmail.com> wrote on 04/07/2010 07:16:55 AM:

> I am trying to display a document which was created with a different
> DOM implementation. The documentation seems to suggest this is
> possible but I get an exception. Please could someone explain what's
> happening?

> Example code fragment:
> Document d = 
DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(FILENAME);

    The main issue is, I think, that your XML parser is not configured
to be namespace aware.  Without namespaces you end up with an
'svg' element that is not in the SVG namespace and consequently
when we import your DOM for the canvas it ends up not being an
SVGSVGElement - which means that it can't be displayed in the canvas.


Mime
View raw message