Merging XML Configuration Files
(version 2.4 and higher)
|
|
|
|
Customizable XML Configuration Files
The following H-Sphere components are configured by means of XML files:
XML Customization Step By Step
Instead of moving and changing a default XML file, a small custom file is created
containing only the changes to be implemented,
and its location is specified in hsphere.properties in
the parameter with the "CUSTOM_" prefix added to the default parameter name. For example:
Go through the following steps to customize your XML configuration files:
- Login as cpanel user.
- Create a directory for custom XML configuration files if it does not exist, for example,
~cpanel/custom/xml.
- In the custom directory, create a custom XML file if it hasn't been created yet.
<?xml version="1.0"?>
<!DOCTYPE config [
<!ELEMENT config (menus,interface)>
<!ELEMENT menus (menu+)>
<!ELEMENT menu (menuitem*,initmenu*)>
<!ELEMENT menuitem (#PCDATA)>
<!ELEMENT initmenu (#PCDATA)>
<!ELEMENT interface (menudef+)>
<!ELEMENT menudef (initmenu*,menuitem*)>
<!ATTLIST menudef id CDATA #REQUIRED>
<!ATTLIST menu name CDATA #REQUIRED>
<!ATTLIST menu label CDATA #REQUIRED>
<!ATTLIST menu platform_type CDATA "">
<!ATTLIST menu resource CDATA "">
<!ATTLIST menu defaultitem CDATA #REQUIRED>
<!ATTLIST menu tip CDATA "">
<!ATTLIST menuitem name CDATA #REQUIRED>
<!ATTLIST menuitem label CDATA #REQUIRED>
<!ATTLIST menuitem URL CDATA #REQUIRED>
<!ATTLIST menuitem platform_type CDATA "">
<!ATTLIST menuitem resource CDATA "">
<!ATTLIST menuitem tip CDATA "">
<!ATTLIST menuitem check_type CDATA "1">
<!ATTLIST menuitem new_window CDATA "0">
<!ATTLIST initmenu name CDATA #REQUIRED>
]>
<config>
<menus>
<menu name="info" label="info.label" defaultitem="info-plans" tip="info.tip">
<menuitem name="new_item" label="NEW PAGE" URL="/newpage.html" resource="" tip="Positive Software Corporation"/>
</menu>
</menus>
</config>
IMPORTANT:
In the custom XML file to be merged with the default one, you must define the same DTD structure!
- In ~cpanel/shiva/psoft_config/hsphere.properties, add the location
for the custom XML file, for instance:
- Login as root (log off from cpanel) and
restart H-Sphere.
|
|
|
|