Author Topic: XML functions v0.9b  (Read 2341 times)

0 Members and 1 Guest are viewing this topic.

Offline JFK

  • Camper
  • ***
  • Posts: 255
    • My TraxInSpace Account
XML functions v0.9b
« on: March 22, 2009, 03:52:35 pm »
Script Name: XML Functions 0.9b
Script Description Functions to load, save and edit XML files.
Author: JFK
Compile Test: Passed
Core Version: 2.6.3
Hosted by: Soldat Central - http://soldatcentral.com/

Full Description:

Using XML can help you organize and store large data structures, such as scripts that will work a lot of statistics, settings or tweakpoints. These functions will able your scripts to load, save and edit XML-files and store your data in a XML structure.

Comes with a manual.



(Size 163.75 KB)
- http://soldatcentral.com/index.php?page=script&f=106 -


** Script hosted by Soldat Central! Please visit the author's script page and Rate this script **
Come join: EliteCTF
Listen to: My Music

Offline xmRipper

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 742
    • Personal
Re: XML functions v0.9b
« Reply #1 on: March 22, 2009, 04:31:50 pm »
Good work.

Quote
1598> //YOUR SCRIPT STARTS ON LINE 1601! thats including the +1 from the soldat compiler..
1599> //so line 1601 is line 1 of your script if you didn't get it yet.

ehh useful =)
Co-Founder / CTO @ Macellan
Founder Turkish Soldat Community

Offline iDante

  • Veteran
  • *****
  • Posts: 1967
Re: XML functions v0.9b
« Reply #2 on: March 22, 2009, 05:41:38 pm »
That is awesome.

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: XML functions v0.9b
« Reply #3 on: March 22, 2009, 08:07:31 pm »
Wow this seems really cool. I guess it could used in combo with GetURL to try to get a piece of a site somehow or something.. or for many other things too. :)

Offline JFK

  • Camper
  • ***
  • Posts: 255
    • My TraxInSpace Account
Re: XML functions v0.9b
« Reply #4 on: March 22, 2009, 08:44:10 pm »
Wow this seems really cool. I guess it could used in combo with GetURL to try to get a piece of a site somehow or something.. or for many other things too. :)

Yep you can, although XMLstrtoElem and XMLelemtoStr aren't primary functions. You'd have do disassemble some pointers to use them or parse the XML as whole document. It would be cool to add XMLgetURL or URLtoELem or something later, for easy communication with php and such.

Thanks for the replies. I was hoping to use this for a new open XML standard for maps, so a mapmaker or owner can create a XML file with additional settings for each map. I'll open a topic about it in discussions soon, cause I'm definitly going to need some help :)
Come join: EliteCTF
Listen to: My Music

Offline danmer

  • Camper
  • ***
  • Posts: 466
  • crabhead
Re: XML functions v0.9b
« Reply #5 on: March 24, 2009, 05:38:28 am »
hell... how long did it take you to make this... Looks ridiculously useful Oo

Offline JFK

  • Camper
  • ***
  • Posts: 255
    • My TraxInSpace Account
Re: XML functions v0.9b
« Reply #6 on: March 24, 2009, 06:51:26 am »
hell... how long did it take you to make this... Looks ridiculously useful Oo

Thank you :D

About a month.. let's say 10 hours total :p
Hardest part was to translate a XML-file to the memory. I challenge anyone who thinks is more expert with regular-expressions then me now ;)
And to be honest, I'm not too sure about the usefulness. It's all pretty heavy on the processor. I mean, look at the compile log. It took the test compiler 2 full seconds to compile it all (I don't know if that includes the ActivateServer() procedure, cause then it would explain a lot). But assuming that server-hardware will only get better, i'd guess it would be a wise choice to use a bit more processor-intensive methods if that will help you keep a solid programming structure.
Come join: EliteCTF
Listen to: My Music

Offline danmer

  • Camper
  • ***
  • Posts: 466
  • crabhead
Re: XML functions v0.9b
« Reply #7 on: March 24, 2009, 01:55:45 pm »
compare it to the ini files people are using now

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: XML functions v0.9b
« Reply #8 on: March 24, 2009, 04:25:14 pm »
I mean, look at the compile log. It took the test compiler 2 full seconds to compile it all (I don't know if that includes the ActivateServer() procedure, cause then it would explain a lot).
Don't rely on the compile time shown there, the server doing the compile is on a shared web hosting environment with 113 other domains. It barely has any CPU/Memory resources available.

EDIT: Recompiled it, came out as 0.193, seems about right.

Offline CurryWurst

  • Camper
  • ***
  • Posts: 265
    • Soldat Global Account System
Re: XML functions v0.9b
« Reply #9 on: May 04, 2009, 02:40:47 pm »
Jesus, this script is awesome. Very useful indeed. Hope you keep it updated :)
XML support and classes is one of the best inventions for the soldat scriptcore I've ever seen.
It's always a good idea to revive the "obsolete" scriptcore by adding new sensible functions.
Soldat Global Account System: #soldat.sgas @ quakenet