Which XML module?

BlitzMax Forums/BlitzMax Programming/Which XML module?

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.

Extendability is quite a useful thing to have, I think.
For example, imagine you have something like this :
<control type="pushbutton">
	<attributes>
		<string name="name">button1</string>
		<int name="posX">10</int>
		<int name="posY">10</int>
		<int name="posWidth">10</int>
		<int name="posHeight">10</int>
		<color name="foreColor" use="true">
			<red>255</red>
			<green>0</green>
			<blue>0</blue>
		</color>
		<font name="font">
			<name>Arial</name>
			<size>12</size>
			<style>normal</style>
		</font>
	</attributes>
</control>

It's very easy to create a new attribute type and simply add it to whichever control-type might need it. The nice thing is that you can add extra tags that one particular program might not bother about and just ignore it.
You can also read the format without the need for a document which describes what the 3rd byte in every 6th block of 238 bytes is for... (indeed, it is practically self-documenting)
And because it is portable, if you required a need to transform the data for use elsewhere, there are lots of neat little toys that can do this for you with relative ease. Otherwise, you'd have to code converters for your very-custom binary format.
You can also, with XML, tweak data in your favourite text editor. It's great for throwing ideas at.... create some tags, add some attributes... ooh, nice schema for doing such and such... whereas you can't really make a binary format up as you go along. (unless you are microsoft and are creating a text-document format).