To XML or not to XML, that is the question...

BlitzMax Forums/BlitzMax Programming/To XML or not to XML, that is the question...

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

This is something I did a while back, not guaranteed to work well at all though.

What you could do is use Xml and provide a 'compiler' for it, reducing an otherwise large file to a chunk-based format that would be signifigantly smaller. You could compile them at runtime and include an MD5 in the compiled version to check against the existing Xml file, and if the MD5 doesn't match then you rebuild the compiled version.

The advantage of this is loading speed and size. The compiled version could be more tailored to loading straight to memory because you could simple do something like
Stream.ReadBytes( Varptr obj.FirstField, dataSize )

instead of having to enumerate all of the elements and attributes in an Xml file.

Well, just my $.02.