Scripting/Server/Classes/XML/GetAttribute
Attributes. value may be a string, integer, float or bool (stored as text).
Syntax
el.GetAttribute(key)el.SetAttribute(key, value)el.RemoveAttribute(key)Arguments
- string key
- bool value –
valuemay be a string, integer, float or bool (stored as text).
Example
function onPlayerCommand( player, cmd, params )
{
if ( cmd == "getattribute" )
{
// el is a el handle (see XML)
el.GetAttribute( "X" );
}
}This sample was generated from the signature – adapt the values to your gamemode.
Related pages
- XmlDocument
- doc.LoadFile
- doc.FirstChild
- doc.LinkChild
- doc.Clear
- XmlElement
- el.FirstChild
- el.LinkChild
- el.RemoveChild
- el.Clear
Section: XML
Categories: Server methods | XML