Jump to content

XML Editor GUI within Torque3D


Recommended Posts

Hello Peoples!

I need to create a XMLEditor within T3D and visualize it with a GUI and make it functional there as well. Therefore I need some informations regarding the backend library "tinyxml" which is already available and how to get backend logic into the scripts.

My prerequisite is the "Coin Collection Tutorial" which gave me a good, crude understanding in how the Script and GUI works.

In fact I just want to ask if it is trivial to accomplish following specifications:


  • - Load an xml file out of the project folder

    - visualize it in a tree dom within the GUI

    - manipulate those tree nodes

    - and save it as a new XML / update the old XML afterwards


I would appreciate any guidance you guys can give me to have a quicker start, since I only have 2 weeks left for that task.

EDIT: To make things clear - I don't need a guide how to use the api of tinyxml or streams in c++ etc. I more need a entry point on where to add a new class to create my api and how to connect it to the gui scripts

greets Charlie! 8-)

Link to comment
Share on other sites


From good rlranft... here you have the documentation, and familiarize yourself with the engine....read the GUI Tutorial and the Scripting Tutorial,


See this "SimXMLDocument Class Reference"


You can download the references from here: Torque 3D - Script Manual.chm

Some examples:

function write(%client)  
%file = new FileObject();  
%file.writeLine("any text you want to write here");  


function readXmlExample(%filename)  
   %xml = new SimXMLDocument() {};  
      echo("TABLE:" SPC %xml.attribute("tableName"));  
      while (true)  
         %id = %xml.attribute("id");  
         %desc = %xml.getData();  
         echo("  Shape" SPC %id SPC %desc);  
         if (!%xml.nextSiblingElement("rec")) break;  
      if (!%xml.nextSiblingElement("table")) break;  

source: http://www.garagegames.com/community/forums/viewthread/100483/1#comment-686373

And download the attached old resource "Script_Editor".


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...