Hi Maik. Maik Schrer proveo GmbH: > I'm new to batik and need to change parts of a 'style' attribute in a given > SVG. > For example: read and change the visibility of an element: > <rect id="bg" x="0" y="0" width="800" height="600" > style="visibility:hidden;fill:rgb(0,0,255)"/> > Is this possible with BATIK ?
Certainly. In script you can use the style property of the element to get a CSSStyleDeclaration object that corresponds to the style attribute. var currentVisibility = bgRect.style.getProperty("visibility").cssText; bgRect.style.setProperty("visibility", "visible"); Similarly from Java: String currentVisibility = bgRect.getStyle().getProperty("visibility)".getCssText(); bgRect.getStyle().setProperty("visibility", "visible"); Cameron -- Cameron McCormack | Web: http://mcc.id.au/ | ICQ: 26955922 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]