xml convert

BlitzMax Forums/BlitzMax Programming/xml convert

Chris C(Posted 2006) [#1]
I'd always thought bah, just a glorified text file whats so great about that

I recently implemented saving and loading of all the physics states for the objects in a project I'm doing at the moment and xml has made it so much easier

When adding new properties to my objects I simply and easily add them to the loader and saver in the knowledge that I can load my old data files...

If your worried about people hacking your saved games simply make the xml a password protected zip file with a custom file extension.


Duckstab[o](Posted 2006) [#2]
Please Give an example


Chris C(Posted 2006) [#3]
heres the loader and saver


this is an example file



N(Posted 2006) [#4]
When doing
Local meshnamenode:XmlNode=XmlNode.create(node,"MeshName",Null)

You can just do this instead
Local meshnamenode:XmlNode=node.AddChild("MeshName")


Also, I've released a new version of the library with a few fixes.


Chris C(Posted 2006) [#5]
must have missed that in the doc's ;p

Is there any difference?


N(Posted 2006) [#6]
Nope, just a convenience thing.


Chris C(Posted 2006) [#7]
okay thanks!

I hope people have been giving you feedback, makes you wonder if its worth contributing to the "community" somtimes...


Brucey(Posted 2006) [#8]
Hey Chris, I thought you said xml was just a glorified text file, eh? *nudge* *nudge* :-p

But don't you think you'd have been better using a custom binary format for all that? It would have taken up a tenth of your valuable disk space :-)


Chris C(Posted 2006) [#9]
lol - nice try brucey ;) ascii zip's *rather* well!


Duckstab[o](Posted 2006) [#10]
Thanks For the sample Chris :)