Thank you for you suggestions, I tried to do like String data =""> "href="" type=\"text/css\""; ProcessingInstruction pi = doc.createProcessingInstruction("xml-stylesheet", data); doc.insertBefore(ssp, doc.getDocumentElement()); but, I still have a problem with it. While running the application, there is a SVG Error:
Null Document reference: Invalid CSS document at org.apache.batik.css.engine.CSSEngine.parseStyleSheet(Unknown Source) at org.apache.batik.css.engine.CSSEngine.parseStyleSheet(Unknown Source) at org.apache.batik.dom.svg.SVGStyleSheetProcessingInstruction.getCSSStyleSheet(Unknown Source) at org.apache.batik.css.engine.CSSEngine.getStyleSheetNodes(Unknown Source) at org.apache.batik.css.engine.CSSEngine.getCascadedStyleMap(Unknown Source) at org.apache.batik.css.engine.CSSEngine.getComputedStyle(Unknown Source) at org.apache.batik.bridge.CSSUtilities.getComputedStyle(Unknown Source) at org.apache.batik.bridge.CSSUtilities.convertVisibility(Unknown Source) at org.apache.batik.bridge.SVGSVGElementBridge.createGraphicsNode(Unknown Source) at org.apache.batik.bridge.GVTBuilder.build(Unknown Source) at org.apache.batik.swing.svg.GVTTreeBuilder.run(Unknown Source) it seams like it can’t find the CSS file.
|
- How to associate css file from JAVA? Dudka Tetyana
- Re: How to associate css file from JAVA? Thomas DeWeese
- Re: How to associate css file from JAVA? Måns Rullgård
- Re: How to associate css file from JAVA? Dudka Tetyana
- Re: How to associate css file from JAVA? Thomas DeWeese
- How to associate css file from JAVA? Dudka Tetyana
- Re: How to associate css file from JAVA? Thomas DeWeese