Jump to content

[HELP] How to save grid list rows to xml file?


Recommended Posts

You can use this, but if you want save player data SQL is better than XML

function savef()
	local gridText = guiGridListGetItemText( gridlist, row, column )
	local RootNode = xmlCreateFile("new.xml"," newroot")
	local NewNode = xmlCreateChild(RootNode, "newchild")
	local xmlBindsBranch = xmlFindChild(RootNode,"newchild",0)
	if ( xmlBindsBranch ) then 
		xmlNodeSetValue( xmlBindsBranch, gridText ) 
    	local success = xmlNodeGetValue ( xmlBindsBranch ) -- get "newchild" value
    	if ( success ) then
    		outputChatBox( tostring( success ) ) 


addCommandHandler("createfile", savef)


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...