XML Library - Suggestions

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Hi everyone, :)

    I have a basic extension idea, and it'll need to use XML files to store data. The files don't need opening in third party apps, so I'm not too concerned about validating the code produced.

    Anyone got any suggestions on an easy but powerful library?

  • I've never used JSON. Below is a mockup of how a data file might look in XML - it's a little long, but can you do a small excerpt of how it might look in JSON? :)

    It's for RPG conversations, the extension will have a handy editor which makes these files easier to prepare (all point-and-clicky), but basically the IF attribute triggers a condition in MMF that you name yourself, and it has an action that returns true, false, or a value. If the expression in IF is false, the node is skipped and the next one is evaluated.

    The NEXT attribute jumps to a specific node, by its LABEL attribute, or keyword END being end of conversation.

    THEN triggers an action of your choice when this node of conversation ends. It triggers a named event, as with IF.

    (any suggestions on a better system are appreciated too XD )

  • JSON is a different beast, but here's an idea of how some of it might look:


    As for a parser, Please login to see this link. is the one used in the Edif SDK.

    Edited 5 times, last by Forum User (March 20, 2012 at 9:02 PM).

  • I too think you should use JSON for this - it will have a smaller file size, it will be much easier to type and read, and James has already written a parser that, if you're using EDIF, you already have in your project. If you're not using EDIF, you're missing out ;)

    Working as fast as I can on Fusion 3

  • Well JSON is nice. I don't find it particularly more readable than your XML example. Obviously JSON has it's advantages on the web (in the context of JavaScript and file size before compression), but there is a lot of XML-hate going around at the moment which is unwarranted in general, along with a general notion that writing less is always better, and significant whitespace is all the hype, man. I don't advocate either option. Just consider your use case and how quickly existing tools will help you get the job done. For JSON I would suggest trying James' JSON parser, but I don't know if it can encode for saving JSON to a file (i.e. it is just a parser and not an encoder). For XML I would definitely suggest TinyXML, it's so simple and manages its own memory so you don't have to worry too much about leaking, and can load and save xml files very easily without too much hassle. I used it because all I wanted was a file format that could be read in plain text and a well developed library that would abstract most of the hassle of loading and saving a document structures, and TinyXML does this. Someone should suggest a JSON library that is equally agile, but I don't personally know of any.

    Edited 3 times, last by MattEsch (March 24, 2012 at 3:37 PM).

  • Well I meant someone with experience of a suitable implementation should highlight it. I can't do that because I haven't tried out any of the 21 JSON parsers you mention, and just pointing at them (I was aware before hand anyway) doesn't make it any more obvious which ones are worth using. I can easily strike off those that only parse JSON, but I wouldn't be able to say which of these libraries are nice to use when encoding and parsing JSON, and that's essentially what the question is asking for. Hence someone should suggest one that they know from experience matches the quality of a library like TinyXML.

  • Check my Signature where it says "Write Extensions with EDIF!", there are two different hyperlinks. The first is the main post, the second explains it.

    Working as fast as I can on Fusion 3

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!