<- Back to CNS Menu function list
CNSMenu_DefineMenuFile
- Description
This function is similar to the CNSMenu_DefineMenu function, except that instead of defining the actual XML text, you sepecify a file on the hard drive containing the XML text. The XML file you specify must be a "well-formed" XML document. Unlike the CNSMenu_Define function, the XML file you specify must contain the root <CNSMenu> and </CNSMenu> tags.
- Return Type
- Text
- Format
- CNSMenu_DefineMenuFile ( File )
- Required Parameters
- File
The Path and File Name of the XML File that Defines the Menu(s).
- File
- Related Items
- CNSMenu_DefineMenu, CNSMenu_DefineQuickMenu, CNSMenu_File_GetPath
- Examples
Example 1
Code:
CNSMenu_DefineMenuFile("c:\xmldocs\my_menu.xml")Result:
Specifies the xml file with a Windows path.Example 2
Code:
CNSMenu_DefineMenuFile("/xmldocs/my_menu.xml")Result:
Specifies the xml file with a Mac OSX path.Example 3
Code:
CNSMenu_DefineMenuFile( CNSMenu_File_GetPath("Database")& If( Abs( Get( SystemPlatform ))= 1 ;"/";"\\")&"my_menu.xml")Result:
Specifies the xml file location using the CNSMenu_File_GetPath function to dynamically get the path to the database. This assumes the XML file is located in the same folder as the database file.