Jump to content

About XML


xeon17

Recommended Posts

Hi guys i want to know how to save color of a radararea in a XML file , for me XML look easiest way to do it because i don't know anything about SQL or Mysql

Can anyone give me example to save color of a radar area in xml file , and explain me how everything work.

Ty :D

Link to comment
local gAreas = getElementsByType("radararea") 
for placeNumber, areaData in ipairs(gAreas) do 
    --Get stuff and place them into XML 
end 
--Later, when you want to receive them: 
local xmlLoadFile("file.xml") 
local child = xmlFindChild(file,  
local gChildren = xmlNodeGetChildren(child) 
for placeNumber, childrenData in ipairs(gChildren) do 
    --Get attributes (Like position, colors, etc.) and use them 
end 

Just make a random XML file, and try creating some childs and finding them. Also with attributes. Explanations are on wiki.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...