XmlCopyFile: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(New page: __NOTOC__ {{Server client function}} This function copies all contents of a certain node in a XML document to a new document file, so the copied node becomes the new file's root node. ==...)
 
No edit summary
Line 4: Line 4:


==Syntax==  
==Syntax==  
Server:
<syntaxhighlight lang="lua">
xmlnode xmlCopyFile ( xmlnode nodeToCopy, string newFilename, resource root = getThisResource () )
</syntaxhighlight>
Client:
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
xmlnode xmlCopyFile ( xmlnode nodeToCopy, string newFilename )
xmlnode xmlCopyFile ( xmlnode nodeToCopy, string newFilename )

Revision as of 15:51, 20 October 2007

This function copies all contents of a certain node in a XML document to a new document file, so the copied node becomes the new file's root node.

Syntax

Server:

xmlnode xmlCopyFile ( xmlnode nodeToCopy, string newFilename, resource root = getThisResource () )

Client:

xmlnode xmlCopyFile ( xmlnode nodeToCopy, string newFilename )

Required Arguments

  • nodeToCopy: the xmlnode that is to be copied to a new document.
  • newFilename: the filename for the new XML document.

Returns

Returns a xmlnode if the node was successfully copied, false if invalid arguments were passed.

Example

See Also