Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » SVG error
SVG error [message #1837034] Thu, 21 January 2021 09:31
Mariem Makni is currently offline Mariem MakniFriend
Messages: 46
Registered: February 2013
Member
Hi all,

I use batik and canvas class to load and display an svg image .
Here my java code and please find attached the xml code of my svg image

mainFrame = new JFrame("Task Graph");
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("output.xml");
pane.add(canvas, BorderLayout.CENTER);
pane.setVisible(true);

My problem is when I run the code:, I get this error:

"svg error: content is not allowed in prolog.

Could you help me please!!
Thank you in advance.

mainFrame = new JFrame("Task Graph");
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("output.xml");
pane.add(canvas, BorderLayout.CENTER);
pane.setVisible(true);
  • Attachment: output.xml
    (Size: 4.81KB, Downloaded 90 times)
Previous Topic:Apache batik
Next Topic:Limitations of running plugins as jars (packed) or dirs (upacked)
Goto Forum:
  


Current Time: Thu Dec 05 10:32:27 GMT 2024

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

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

Back to the top