Today, after two weeks of work I proudly present X清L, a direct descendant of GhostKeeper's work.
X清L takes the base of simplXML, and expands it considerably, X清L's features include:
- Adding, deleting, and renaming elements.
- Supports writing tags, attributes and data.
- Saves XML files.
- A ground-up rebuild of the search functions to incorporate Dompath style searching (test\object\settings\setting) no more rewriting the search path based on position!
- xml_new(), the ability to create a brand new xml document without having one to start.
Anything simplXML couldn't parse, this can't.
Also don't bother using entity whatevers, I couldn't figure out how to reimplement them.
Who to give credit to:
GhostKeeper: for the base of this code with simplXML.
Me: for improving on a great system.
- 14/03/2010 - Added xml_dompath_count(), to count sub elements, easing automated searching.
Please note there may be the odd bug lurking somewhere in the code, so if u find it please let me know with as much detail as possible.
What is XML?
XML (eXtensible Markup Language) is a set of rules to define a tree like strucure for storing data. It is used for many things, from RSS feeds to XHTML.
Why use XML to store data?
XML is a excellent way to store data for a number of reasons.
In the case of games, savegames that use XML can automatically support DLC/updates because DLC savedata can be stored in a seperate node, not needed by the main game. Saving headaches with version compattibility.
It's structure also makes it very simple to search multiple elements for relevant data if setup correctly.
Edited by databot, 14 March 2010 - 08:43 PM.