Hi Mathieu,
Mathieu Pedrero <[email protected]> wrote on 09/03/2009 05:06:55
AM:
> public Molasson() {
> // I add this document to the canvas, and the canvas to the panel.
> canvas.setDocument(document);
> jPanel1.add(canvas);
It's not likely to be the problem, but it's _much_ better to
add the canvas to the panel before you set the document on it.
> String documentString =
DOMUtilities.getXML(document.getDocumentElement());
>
> Document document2 = (Document)
DOMUtilities.parseXML(documentString,null,null,null,null,f);
Can I suggest, you use the following instead:
Document document2 = (Document)
DOMUtilities.parseXML(documentString,null,
jfc.getSelectedFile().toURI().toString(),null,null,f);
This will ensure the document as a 'base URI' associated with it
in case it needs to resolve relative URL's.
> java.lang.NullPointerException
> at org.apache.batik.bridge.BridgeContext.
> getInterpreter(BridgeContext.java:566)
Can you send what your version of the Batik Source has at
BridgeContext.java line 566?