I've got an unusual question that I've been having a difficult time finding an answer to...
I want to create a svg on the fly for putting onto a JFramel. Strange part is I want to create the svg based off a string such as follows: String theString = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.0//EN' 'http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd'><svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" style=\"fill-opacity:1; color-rendering:auto; color-interpolation:auto; text-rendering:auto; stroke:black; stroke-linecap:square; stroke-miterlimit:10; shape-rendering:auto; stroke-opacity:1; fill:black; stroke-dasharray:none; font-weight:normal; stroke-width:1; font-family:'Dialog'; font-style:normal; stroke-linejoin:miter; font-size:12; stroke-dashoffset:0; image-rendering:auto;\" xmlns=\"http://www.w3.org/2000/svg\"><defs id=\"genericDefs\" /><g><text xml:space=\"preserve\" x=\"10\" y=\"30\" style=\"stroke:none;\">My Text...</text></g></svg>"; I figured out one way to do this, try { // Create temp file. File temp = File.createTempFile("pattern", ".suffix"); // Delete temp file when program exits. temp.deleteOnExit(); // Write to temp file BufferedWriter out = new BufferedWriter(new FileWriter(temp)); out.write(theString); out.close(); } catch (IOException e) { Now I am trying to figure out a way to do this without creating a temp file. Does anybody know a way to do this? Thanks. Ben -- View this message in context: http://www.nabble.com/Create-SVG-on-the-fly...-tf2146890.html#a5927533 Sent from the Batik - Dev forum at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
