XML parser/xmlfile component

If there is something important you think is missing in the current version of ZGameEditor then you can post a feature request here!

Moderator: Moderators

Post Reply
darkhog
Posts: 58
Joined: Sun Sep 09, 2012 7:59 pm

XML parser/xmlfile component

Post by darkhog »

How about component that would let us store game's config or other data in convenient XML format, so in case user would set wrong settings that would render game unusable he/she could edit convenient xml file.

Or maybe I am missing something and there's already way to read/write .XMLs from within game?
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Post by Rado1 »

You can read/write any file format with File component, including XML. Of course you must write code for loading and saving XML files having application-specific schema. This is not a big problem, because more effort is not put to "wrapping" data to XML format, but mapping of the imported/exported data to/from data holders in your application (variables, properties of components and their instances).

Having a generic XML parser in ZGE would be more complicated - for instance, for a given structure (schema/DTD) of XML file you need to specify actions applied when some tag, attribute or content was parsed, also you need to specify generation of tags based on runtime configuration of your application and included objects, etc. Even if a generic XML parser would help, specifying these actions/mapping can be complicated.

I'm skeptic about usage XML for storing application configuration and I personally prefer proprietary application-specific configuration files. Is there any strong argument for XML?
User avatar
Kjell
Posts: 1876
Joined: Sat Feb 23, 2008 11:15 pm

Post by Kjell »

Hi darkhog,

I wrote a INI library for ZGameEditor a couple of years ago. You might want to take a look / use that :wink:

K
Post Reply