I want to display a diagram saved as xml/svg
To save the xml.svg I do the following<BR> FileOutputStream fos = new FileOutputStream(fileName);<BR> <BR> // generate the JGo xml and svg for output<BR> DefaultDocument svgDomDoc = new DefaultDocument();<BR> svgDomDoc.setGenerateJGoXML(true);<BR> svgDomDoc.setGenerateSVG(true);<BR> svgDomDoc.SVGWriteDoc(fos, _myJGoView.getDocument());<BR> <BR> fos.flush();<BR> fos.close();<BR>
And i get a file like this
[code]
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<jgoxml:JGoClass class=“com.nwoods.jgo.JGoDocument” defaultlayer=“null” docheight=“603” docleft=“0” doctop=“0” docwidth=“1385” modifiable=“true”/>
<jgoxml:JGoClass class=“com.nwoods.jgo.JGoLayer” modifiable=“true” transparency=“1.0” visible=“true”/>
<jgoxml:JGoClass backdraw=“jgoid1” bottomport=“jgoid3” class=“com.nwoods.jgo.examples.MultiTextNode” embeddedlinepen=“true” insetbottom=“0” insetleft=“2” insetright=“2”
... etc ...
[/code]
I then read the file with the code shown below. The file is read, the JGoDocument is not empty but the view is empty.
[code]
FileInputStream fis = new FileInputStream(fileName);
// generate the JGo xml and svg for output
DefaultDocument svgDomDoc = new DefaultDocument();
JGoDocument jgoDocFromXml = new JGoDocument();
svgDomDoc.SVGReadDoc(fis, jgoDocFromXml);
fis.close();
_myJGoView.setDocument(jgoDocFromXml);
[/code]
What's wrong? I am expecting the diagram to be displayed in _myJGoView (which is displayed in an applet).