We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › How to save tree structure to a file
Page Index Toggle Pages: 1
How to save tree structure to a file ? (Read 1015 times)
How to save tree structure to a file ?
May 19th, 2010, 4:54am
 
Hello,
I would like to know - how to save tree structure to a file ?
I have created a quad tree class Node

Node tree;

How to save entire 'tree' to a file in Processing ?

please help.
Re: How to save tree structure to a file ?
Reply #1 - May 19th, 2010, 5:56am
 
XML comes to mind, it is quite adapted to hierarchical data.
Or you can try a lighter alternative, like Json or Yaml.
Or just indented strings...
Re: How to save tree structure to a file ?
Reply #2 - May 19th, 2010, 6:08am
 
I tried with this java example: ObiectOutputStream...

http://www.kodejava.org/examples/215.html

but couple of errors were thrown when i have tried to save my tree structure via this method Sad
Page Index Toggle Pages: 1