Version 1.0.2, by Ghostkeeper
SimplXML is an XML (eXtensible Markup Language) Parser for Game Maker (registered) completely within 24kb of GML code. It reads an XML file and puts it in a tree-like structure, making it easy to use for the average programmer.
I created this set of scripts to let game makers be able to use the oh-so-handy XML files in their games and applications. I noticed there was a reasonably large demand, but only one tryout about 1,5 years ago.
Meanwhile, I've gotten some competition! If you're having trouble with this XML parser, take a look at this script by Major Victory. It's more line based than SimplXML, it uses the SAX method in stead of the DOM method to read it.
Coding this baby wasn't easy. It took me a full 2 weeks coding just 1 script (the loading script obviously). Yet still, not all functions of XML as stated by w3c are implented (non-declaring parameters, language identification, element type declarations and parsed entities, document type declaration, I didn't think it would be used much / easy enough to program). The functions that are supported and a full documentation of all supported rules is in the readme file.
In the zip file is an example of how to extract information, as well as information on how to use SimplXML and what structure is the supported one.
xml_findvalue() is made by Carlos Ramos, I am grateful to him to make me that script, and you should be too!
Download: (15kb, zipped, version 1.0.2)
ghostkeeper.nl
Version History:
SimplXML 1.0.2 - Updated Carlos Ramos' xml_findvalue() script, he just posted an update. Thanks, mate!SimplXML 1.0.1 - Fixed a small problem with xml_findvalue() and xml_findposition() that would give an error. - Added the .gme file (GM7's beta extension file) to the pack. This will be removed when GM7 goes to alpha mode.SimplXML 1.0.0 - Got enough reactions and did enough tests to release the project in alpha. - Implented 3 new scripts: xml_findvalue(), xml_findposition() and xml_close().SimplXML 0.3.3 - Implented <![cdata[ ... ]]> tag support. - Made the code check for if the file exists before trying to read it.SimplXML 0.3.2 - Bug fixed where a filtered entity gets placed at the wrong position.SimplXML 0.3.1 - Bug fixed where a space at the end of a line caused the program to freeze.SimplXML 0.3.0 - Initial release. 0.1.0 and 0.2.0 were tryouts but failed. Eventually on the third complete redo I succeed.
Have fun with it!
Edited by Ghostkeeper, 04 February 2007 - 10:27 AM.











