Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Problem with SVG(SVG error: content is not allowed in prolog!!)
Problem with SVG [message #1837253] Tue, 26 January 2021 09:59
Mariem Makni is currently offline Mariem MakniFriend
Messages: 46
Registered: February 2013

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");




Container pane = mainFrame.getContentPane();

pane.setLayout(new BorderLayout());

JSVGCanvas canvas = new JSVGCanvas();

pane.add(canvas, BorderLayout.CENTER);


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"
<svg width="1967pt" height="76pt" version="1.1"
 xmlns="" xmlns:xlink= "">
  <g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 72)">
<polygon fill="#ffffff" stroke="#000000"  points="-4,4 -4,-72 1963.045,-72 1963.045,4 -4,4"/>
<g id="clust1" class="cluster">
<polygon fill="none" stroke="#000000" points="8,-8 8,-60 1951.045,-60 1951.045,-8 8,-8"/>
       <!-- task_36 -->
       <g id="node1" class="node">
       <g id="a_node1"><a xlink:href="/home/makni/hello.c#178" 
<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" 

Could you help me please?

THank you in advance
Previous Topic:Error Downloading Eclipse
Next Topic:Class File Editor - Source not found error
Goto Forum:

Current Time: Fri Jul 23 20:09:48 GMT 2021

Powered by FUDForum. Page generated in 0.02630 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top