XmlCreateFile: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{Server client function}}
{{Server client function}}
This function creates a new XML document, which can later be saved to a file by using [[xmlSaveFile]].
This function creates a new XML document, which can later be saved to a file by using [[xmlSaveFile]]. This function will overwrite the file specified if it already exists.


==Syntax==  
==Syntax==  

Revision as of 22:56, 17 December 2007

This function creates a new XML document, which can later be saved to a file by using xmlSaveFile. This function will overwrite the file specified if it already exists.

Syntax

Click to collapse [-]
Server
xmlnode xmlCreateFile ( string filename, string rootNodeName, [ resource inResource = getThisResource() ] )

Required Arguments

  • filename: the name of the XML file you wish to create.
  • rootNodeName: the name of the root node in the XML document.

Optional Arguments

NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use. For more information on optional arguments, see optional arguments.

  • inResource: the resource whose directory will be used as the root for the filename specified. Note that if a different resource than default is being accessed, the caller resource needs access to general.ModifyOtherObjects in the ACL.
Click to collapse [-]
Client
xmlnode xmlCreateFile ( string filename, string rootNodeName )

Required Arguments

  • filename: The name of the XML file you wish to create.
  • rootNodeName: The name of the root node in the XML document.

Returns

Returns the root xmlnode object of the new XML file if successful, or false otherwise.

See Also