Xml stands for extensiblemarkedlanguage. this language system has become popular in the world in recent years due to its unique advantages in data processing and cross-platform processing. The XML language system processes any data as keys and values.
Xml stands for extensible marked language. this language system has become popular in the world in recent years due to its unique advantages in data processing and cross-platform processing. The XML language system processes any data as keys and values. This is similar to many database management systems (DBMS) and has nothing to do with specific machine commands, its storage method is plain text files, so it has excellent cross-platform performance. In addition, it allows users to create their own data command systems. under the framework of this command system, users can convert all information into easy-to-access data, this greatly accelerates the development cycle and code portability.
What does XML look like? Recently, the author developed a menu control based on the. net platform due to the needs of the project, and participated in the XML features. The procedure is as follows:
Step 1: create a menu control on the. net platform
. The following figure shows the operating principle of custom controls on the. net platform: controls correspond to a class. all attributes of controls are exposed through the class member variables, the control method corresponds to the member function of the class. When the control is loaded, the system will call the class render method. when creating the control, the override render method should be reloaded so that when the control is loaded, the control can be "drawn" by itself. generally, in the render method, you need to put the Javascript files drawn on the control interface into the output stream.
As it is important to explain the use of XML later, we will briefly describe the custom control here. The following describes the coherent objects, attributes, and methods.
All menu controls are divided into four objects: Topmenu, Submenu, Childrenmenu, and MenuItem. the corresponding information is:
Control properties:
ID: the name of the control.
MenubarHeight: the height of the menu bar.
MenubarWidth: width of the menu bar
BorderWidth: Border width
AutoDropdown: true indicates the active drop-down, and false indicates the mouse drop-down.
DropdownDelay: drop-down time
Menufont: Font
LocationX: the position of menu x
LocationY: the position of menu y
XmlFile: XML file
XmlStream: XML stream
Topmenu object attributes:
ID: Same as above
Text: Text of top menu
Isparent: true indicates that there is a next menu; otherwise, it is false (default value of false)
Islink: true must be used for event processing; otherwise, false (default value of false );
Bgcolor: back-to-landscape
Forecolor: far scenery
HoveredBackcolor: the color of the mouse on the top
Topmenufont: Font
Linkurl: valid only when isparent is false, indicating the url of the connection
Borderwidth: Border width of topmenu
Itemheight: the height of the next menu (the isparent must be true)
Itemwidth: the width of the next menu (the isparent must be true)
Submenus: List of arrays containing the next menu
All attributes of Submenu, Childrenmenu, and MenuItem are the same as those of Topmenu.