XML What is it good for?

Miscellaneous Forums/General Discussion/XML What is it good for?

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.

Well, the advantages are that it's quite organized and easy to read and understand. Also, there are tons of editors made for it that can check for syntax errors, have auto-complete functions and so on.

However, if you are talking about large amounts of data that are only processed by the application (no need to be readable) then I suggest you go for binary as XML can get pretty big pretty fast. That is ofc if you care about size in this project. :D

I use XML quite often, usually for config files or map files, because it's a pretty common format and you can find parsers/editors immediately. All you have to do to parse your config file is sommething like:

Antialias = GetAttributeValue(GetNode(GetNode(Root,"Graphics"),"Antialias"),"Value")


Ofc, this depends on the parser.
And your file looks like:

<Config>
   <Graphics>
      <Antialias Value="8x"/>
      <--!
       Other graphics options here
      -->
   </Graphics>
</Config>