[ABANDONED] ZML

Projects that have specifically been abandoned or considered "dead" get moved here, so people will quit bumping them. If your project has wound up here and it should not be, contact a moderator to have it moved back to the land of the living.
User avatar
Sarah
Posts: 551
Joined: Wed Sep 06, 2006 12:36 pm
Preferred Pronouns: She/Her
Operating System Version (Optional): Debian 11 (bullseye), Windows 10
Location: Middle of Nowheresville Il.

[ABANDONED] ZML

Post by Sarah »

Spoiler:
ZML is no longer available on the ZDoom Forums. Thank you.

My mods are available on my GitHub.
Last edited by Sarah on Mon Jun 05, 2023 8:25 am, edited 9 times in total.
User avatar
Nash
 
 
Posts: 17468
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: ZML

Post by Nash »

Ah, cool, an XML-like reader for custom lumps!
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49188
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: ZML

Post by Graf Zahl »

XML? Yuck!

Why not something sane and less bloated like Json or a limited subset of YML?
User avatar
Sarah
Posts: 551
Joined: Wed Sep 06, 2006 12:36 pm
Preferred Pronouns: She/Her
Operating System Version (Optional): Debian 11 (bullseye), Windows 10
Location: Middle of Nowheresville Il.

Re: ZML

Post by Sarah »

"XML-like" - yeah that's accurate. This follows the XML syntax, it doesn't do anything relating to HTML. I consider how I produce the tree pure witchcraft.

Graf, whatever gave you the idea that I'm a sane person? Lol. And to answer your question, didn't someone already do a Json parser? What's YML?
I think what you intend to do with the data really determines how you store it, so in this case I thought XML was really the best option.
I was also thinking about re-usability - why should I write one specific parser for my needs when I can cover a lot of needs by writing a generic one? XML is pretty straightforward to start using when you don't know more complex languages.
And yes, yuck, that was not fun, I've done it twice now, once with actual XML libraries!
User avatar
mjr4077au
Posts: 830
Joined: Sun Jun 16, 2019 9:17 pm
Graphics Processor: nVidia with Vulkan support
Location: Gosford NSW, Australia

Re: ZML

Post by mjr4077au »

Curious as to whether this supports schema files to govern the validity of the data, and if not, is it planned? If there's no validation of the incoming data, I'd probably have a preference towards JSON too. Validating the data in the schema means modders need to less validation in the zscript files, saving processing time and increasing performance.
User avatar
Sarah
Posts: 551
Joined: Wed Sep 06, 2006 12:36 pm
Preferred Pronouns: She/Her
Operating System Version (Optional): Debian 11 (bullseye), Windows 10
Location: Middle of Nowheresville Il.

Re: ZML

Post by Sarah »

I was going to ask you for English, please, but a quick Google showed me that you're asking the same question I have: "what is enforcing the structure? Is there a way to make sure user data is organized correctly?"

The answer is: right now, absolutely nothing. Make sure you're structure is what you want. BUT, ZMLDEFS is sort-of what we're both looking for. Already I force type expression, and the XML parser will not accept an attribute that is not defined in the given tag. Each file results in its own DOM at the top of the tree; if you go through the root siblings they're all the root of each file. SO, expansion of ZMLDEFS would, at least I think from cursory overview of what we both want, would be the best route. The only real downside is increased complexity of that lump, but should you be reading data from files other than your own, odds are ZML has not read a ZMLDEFS from that other file, it read your tags and now needs to read the other file with your tags, thus I should verify the structure. Consider it planned. When? I do not currently know, I'd like to get accessing the tree going as my own project needs ZML too. One weekend at a time!

Edit: one thing to keep in mind, I'm not expert at XML, I just hack and bash my way to what I want :P

Edit Edit: After having more of a look at schema validation - yes totally doable. I think, at least initial ideas, that ZMLDEFS needs expanded to be the schema definition, the XML parser needs to then enforce a schema declaration, and honestly do the validation post-parse. If the DOM doesn't match the schema, eject it, that's been the default for any error, file or tree.

Return to “Abandoned/Dead Projects”