MaXML v1.9 Released!

BlitzMax Forums/BlitzMax Programming/MaXML v1.9 Released!

John J.(Posted 2006) [#1]
MaXML makes it easy to load, manipulate, and save XML files. MaXML is a very easy to use library of functions for manipulating xml data, including a fast xml parser (which parses roughly twice as fast as Microsoft Internet Explorer's XML viewer) and saver, including encryption support to protect your saved games, high scores, etc. from being edited by players. XML is a widely used and accepted format applied anywhere from word-processors to level builders.

Click here to go to MaXML's showcase entry:
http://www.blitzbasic.com/Community/posts.php?topic=53834

Version 1.9 Update - Added file encryption (optional), and several other features, including xmlNode.ChildIndex(), xmlNode.GetNextSibling(), and xmlnode.GetPrevSibling().


N(Posted 2006) [#2]
Wouldn't it be better if the encryption was done by the person writing the game so that whoever is playing the game doesn't see your code and go "Oh, so THAT's how the scores are encrypted"?


John J.(Posted 2006) [#3]
I don't think you understand. If the player opens up an xml file, all he'll see is a bunch of "garbage" text. The only way to decrypt it really, would be to find out that MaXML is used, download MaXML, learn BlitzMax, find out how MaXML encrypts it's files, and:
A. Write a XML decryption program that works with the file
B. Buy BlitzMax and use MaXML to load it and save it unencrypted.

I wrote the encryption primarily for quick and easy "light" encryption of XML files. The encryption is in no way "failsafe", although it should provide more than enough protection against almost anyone who tries to tinker with your game's data files.


N(Posted 2006) [#4]
learn BlitzMax


Not a neccessary step when you know what you're doing.

I wrote the encryption primarily for quick and easy "light" encryption of XML files.


"Light" encryption is also known as "worthless" encryption.


John J.(Posted 2006) [#5]
"Light" encryption is also known as "worthless" encryption.

Correct. The encryption is not safe against anyone who is seriously trying to crack your XML files, as I have said. It's just enough to protect against an average game player from fooling with your files.


N(Posted 2006) [#6]
It's just enough to protect against an average game player from fooling with your files.


Until someone with enough motivation looks at your code and sees how weak it is. Did you even try to come up with an encryption scheme here?


FlameDuck(Posted 2006) [#7]
Sounds cool. I would recommend something like 3DES or AES for encryption, rather than some 'light' encryption.


popcade(Posted 2006) [#8]
As MaXML is opensource, you can try to apply your own encryption if you really need a serious one.


bradford6(Posted 2006) [#9]
nice job John J.

you others should be ashamed of yourselves. This is a very nice module and 'light' encryption is better than no encryption. I have never seen anything from any of you that is even worth encrypting!


FlameDuck(Posted 2006) [#10]
This is a very nice module
I never said it wasn't. Infact i destinctly remember starting my post with "Sounds cool".

and 'light' encryption is better than no encryption.
No it isn't. First of all 'light' encryption is an ambiguous statement. Is it because it's a weak cipher, or because it's fast, or sometihng else entirely? If it's the former (which I suspect), then it isn't better than no encryption, particularly since XML has standard elements that make it easy for a computer program to identify when/if you've got plaintext.

I have never seen anything from any of you that is even worth encrypting!
And you where doing so well without any personal attacks, too.


John J.(Posted 2006) [#11]
Thanks for the comments (and suggestions:).

Until someone with enough motivation looks at your code and sees how weak it is. Did you even try to come up with an encryption scheme here?

I will re-re-re-state this, since you don't seem to get it: MaXML's encryption is light encryption. It is not completely worthless, but there's not much stopping someone from hacking your XML files. Do not try to secure credit card numbers, etc. with MaXML's encryption! The encryption simply makes your XML files look like a binary file, so when a player opens up "Sherman.tank", for example, all he sees is a bunch of garbage, and assumes that it is a binary file.

FlameDuck: Thanks for the suggestion. I'll probably impliment 3DES or AES encryption into MaXML in future versions.


Why0Why(Posted 2006) [#12]
John,

Thanks for posting. And ignore the flames. There is nothing wrong with constructive criticism, but not much of it was very contructive.

Maybe your next module can be MaxEncrypt(complete with not so light encryption TM) :O


klepto2(Posted 2006) [#13]
Very nice Module,
I will try it out now.
And for those who have problems with the light encryption, write your own file encryption if you want a better one ;)


Jica(Posted 2006) [#14]
I'm gonna throw a friendly bash at FlameDuck as well, but that's strictly for not answering my mails or messages! :o>


John J.(Posted 2006) [#15]
Maybe his spam filter is mistakenly filtering out your e-mails?


Jica(Posted 2006) [#16]
/me sighs

I am probably spam, yeah, lol. But enough of the off-topic stuff with me =)


bradford6(Posted 2006) [#17]
alright, I was a little harsh in my earlier post. my apologies! I am sure all of you have stuff worth encrypting. :)

edit-

The point here is that this module has been updated by it's author, is free to use and does what it is supposed to do.

thanks for the Update John J.


John J.(Posted 2006) [#18]
I've been recently developing MaXML 2.0, which will probably be released soon. It is a complete re-write of MaXML (the old versions are outdated and inefficient, since they were ported from BlitzBasic code).

I don't know older versions of MaXML (pre 2.0) compares to Cower.Xml, because I've never tested MaXML 1.5 - 1.9 against Cower.Xml, but Noel once said that his was faster than mine, so I'll take his word for it.

Just for your information, here is how the new MaXML 2.0 compares to it's competitor:


With a 1.3 MB XML file, the results are (with debug mode off, of course):
MaXML 2.0 parses in: ~290 Milliseconds
Cower.Xml parses in: ~214840 Milliseconds

Obviously, with large files, MaXML 2.0 is ~735 times faster than it's competitor.

I tried a smaller XML file (~50 KM), and here are the results:
BlitzXML 2.0 parses in: ~10 Milliseconds
Cower.Xml parses in: ~160 Milliseconds

So, even with smaller files, MaXML 2.0 is ~16 times faster than it's competitor.

MaXML 2.0 also has a large variety of features, making managing nodes easier than ever.


N(Posted 2006) [#19]
Coolios, I'll have to steal your codez ^_^


bradford6(Posted 2006) [#20]
looking forward to 2.0
nice work John J.


John J.(Posted 2006) [#21]
Update: I've managed to speed up MaXML 2.0 a little, and now it parses at over 4.5 MB per second :)

All I need to do now is finish up the documentation, and MaXML 2.0 will be done.

Click here to download MaXML 2.0 Beta


Booticus(Posted 2006) [#22]
Hey I tried downloading that newest mod and ran the demo included with the old one, and it failed.

"Compile Error: Identifier 'xmlErrorCount' not found
Build Error: failed to compile C:/Documents and Settings/mroberti/Desktop/Un Categorized Blitz Progs/MaXML_v1.9/example.bmx"

Am I blowing it somewhere? Or was the another updated example program I should look for? Also, there was a .zip file with password protection in your 2.0beta. Staying tuned!!! This is a pretty handy module!


John J.(Posted 2006) [#23]
The reason for the error is because MaXML 2.0 uses a different "programmer's interface" than previous versions. All that error checking code is not needed any more because now MaXML uses BlitzMax's exception system. Check the documentation that should be included in the zip file. Hopefully the final release won't be so confusing, since there will be better documentation and examples.

I put a password on the source code because I haven't decided whether or not I'm going to freely distribute the source. If you want it, though, just say so and I'll e-mail you the password.