Hi, when trying to access the DOM of an SVG document in a JSVGCanvas, it should be done via an SVGLoadEventDispatcherListener, to assert that the document is only accessed, when the parsing finished. For example:
this.svgCanvas.addSVGLoadEventDispatcherListener(new SVGLoadEventDispatcherAdapter() { @Override public void svgLoadEventDispatchStarted(SVGLoadEventDispatcherEvent e) { final Element element= svgCanvas.getSVGDocument().getElementById(elementId); element.setAttribute("visibility", "hidden"); } } }); But, of course, this handler is only called once, when the document was loaded. But what, if I can't be sure whether the document was already loaded, but still want to apply this code? What is the recommended approach to modify the DOM, regardless of the fact, whether the document finished loading or not? Regards Marco --------------------------------------------------------------------- To unsubscribe, e-mail: batik-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: batik-users-h...@xmlgraphics.apache.org