Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic saveToXml( Document ) not working (Read 2682 times)
AR
Junior Member
**
Offline


I Love MindFusion!

Posts: 65
Joined: Jan 23rd, 2015
saveToXml( Document ) not working
Feb 9th, 2015 at 4:19pm
Print Post  
I want to save the diagram to XML then store it in a database. So I'm trying to save it to an in-memory XML document, which I can then store to the database. However it does not seem to work.

I have tried the following:
Code
Select All
DocumentBuilder builder = factory.newDocumentBuilder();
            Document doc = builder.newDocument();
            Diagram.registerItemClass(MyClass.class, "MyClass", 1);
            diagram.saveToXml(doc);
            diagram.saveToXml("c:\\temp\\diagramFile.saved"); //added for debugging 


But the value in 'doc' does not change at all (remains a null document).

However the file appears to be correctly written - it contains a large quantity of XML.

Am I calling the version that takes the 'doc' incorrectly?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: saveToXml( Document ) not working
Reply #1 - Feb 10th, 2015 at 9:05am
Print Post  
What do you mean by doc remaining a null document, does the doc variable itself have a null value?
  
Back to top
 
IP Logged
 
AR
Junior Member
**
Offline


I Love MindFusion!

Posts: 65
Joined: Jan 23rd, 2015
Re: saveToXml( Document ) not working
Reply #2 - Feb 10th, 2015 at 2:27pm
Print Post  
Sorry my mistake Embarrassed - wasn't looking at the contents of 'doc' correctly (or saving to db correctly) - it does seem to be okay actually.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint