Mariem makni created BATIK-1298:
-----------------------------------
Summary: Problem with SVG(SVG error: content is not allowed in
prolog!!)
Key: BATIK-1298
URL: https://issues.apache.org/jira/browse/BATIK-1298
Project: Batik
Issue Type: Bug
Reporter: Mariem makni
HI,
I am trying to diplay an svg image using XMl file. Here my code, I am using
batik library and Canvas class:I am trying to diplay an svg image using XMl
file. Here my code, I am using batik library and Canvas class:
JFrame mainFrame = new JFrame("Task Graph.svg"); mainFrame.setSize(800,600);
mainFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
mainFrame.setVisible(true); Container pane = mainFrame.getContentPane();
pane.setLayout(new BorderLayout()); JSVGCanvas canvas = new JSVGCanvas();
canvas.setURI(workDir+"/"+"output.xml"); pane.add(canvas, BorderLayout.CENTER);
pane.setVisible(true);
When I try to run the code in eclipse, I get this error:
*"svg error: content is not allowed in prolog"*
I think the problem is come from this line,:
<g id="a_node1"><a xlink:href="/home/makni/output.hello.c#178" </g>
I don't know if I can use *xlink:href* to get the nodes from a c code using
svg??
here is the xml file:
<?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG
1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg
width="1967pt" height="76pt" version="1.1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink= "http://www.w3.org/1999/xlink"> <g id="graph0" class="graph"
transform="scale(1 1) rotate(0) translate(4 72)"> <title>G</title> <polygon
fill="#ffffff" stroke="#000000" points="-4,4 -4,-72 1963.045,-72 1963.045,4
-4,4"/> <g id="clust1" class="cluster"> <title>cluster_0</title> <polygon
fill="none" stroke="#000000" points="8,-8 8,-60 1951.045,-60 1951.045,-8
8,-8"/> </g> <!-- task_36 --> <g id="node1" class="node">
<title>task_36</title> <g id="a_node1"><a xlink:href="/home/makni/hello.c#178"
xlink:title="non_linear_memset_regression_based"> <ellipse fill="#aaaaaa"
stroke="#000000" cx="161.5871" cy="-34" rx="145.6742" ry="18"/> <text
text-anchor="middle" x="161.5871" y="-30.3" font-family="Times,serif"
font-size="14.00" fill="#000000">non_linear_memset_regression_based</text> </a>
</g> </g> </g> </svg>
Could you help me please?
THank you in advance
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]