XmlLoadFile: Difference between revisions
Jump to navigation
Jump to search
ChacalLoko (talk | contribs) |
mNo edit summary |
||
Line 24: | Line 24: | ||
===Required Arguments=== | ===Required Arguments=== | ||
*'''filename:''' The | *'''filename:''' The [[filepath]] to the file you wish to load. '''. | ||
</section> | </section> | ||
Revision as of 21:23, 16 June 2009
This function provides an alternative way to load XML files to getResourceConfig. This function loads an XML file and returns the node by specifying a specific file path, while getResourceConfig allows for loading an XML file from a resource.
Syntax
Click to collapse [-]
Serverxmlnode xmlLoadFile ( string filename, [ resource fromResource = getThisResource () ] )
Required Arguments
- filename: the path to the file you wish to load. This is a path relative to the current or specified resource root directory.
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.
- fromResource: the resource whose directory will be used as the root for the filename specified.
Click to collapse [-]
Clientxmlnode xmlLoadFile ( string filename )
Required Arguments
- filename: The filepath to the file you wish to load. .
Returns
Returns the root xmlnode object of an xml file if successful, or false otherwise.
Example
This example loads an XML file called test.xml.
node = xmlLoadFile ( "test.xml" )
See Also
- xmlCopyFile
- xmlCreateChild
- xmlCreateFile
- xmlDestroyNode
- xmlFindChild
- xmlLoadFile
- xmlLoadString
- xmlNodeGetAttribute
- xmlNodeGetAttributes
- xmlNodeGetChildren
- xmlNodeGetName
- xmlNodeGetParent
- xmlNodeGetValue
- xmlNodeSetAttribute
- xmlNodeSetName
- xmlNodeSetValue
- xmlSaveFile
- xmlUnloadFile