Tokio Posted December 16, 2017 Share Posted December 16, 2017 i want save grid list rows to xml, and load from xml.. but how to make this? Link to comment
Melbourne Posted December 16, 2017 Share Posted December 16, 2017 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 ) ) end end xmlSaveFile(RootNode) xmlUnloadFile(RootNode) end addCommandHandler("createfile", savef) Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now