deciding on the structure of an XML document is prooving difficult for me.... I want an easy to parse representation of the following array for example
(sorry its long)
I have come up with several different representations of the below array - all valid in one respect or another, are there any hard and fast rules that would help me in structuring an XML document keeping the logic of the array obvious and usable ? - or is it a case of whatever works for me ?? (in which case I dont see the point) -
(sorry its long)
I have come up with several different representations of the below array - all valid in one respect or another, are there any hard and fast rules that would help me in structuring an XML document keeping the logic of the array obvious and usable ? - or is it a case of whatever works for me ?? (in which case I dont see the point) -
PHP Code:
<?
$b_frames=array(
$dev_frame=array(
name=>'dev_frame',
title=>'phpdev5',
dev_start=>array('dev_start','','start','forg.xpm','HORZ','start phpdev','dev5_start',''),
dev_stop=>array('dev_stop','','start','forg.xpm','HORZ','shutdown phpdev','dev5_stop',''),
dev_configure=>array('dev_configure','','start','forg.xpm','HORZ','phpdev installation options','run_exe','..\install.bat')
),
$ap_frame=array(
name=>'ap_frame',
title=>'apache',
ap_start=>array('ap_start','','start','forg.xpm','HORZ','start the apache server','apache_start',''),
ap_stop=>array('ap_stop','','start','forg.xpm','HORZ','stop the apache server','apache_stop',''),
ap_restart=>array('ap_restart','','start','forg.xpm','HORZ','restart the apache server','apache_restart',''),
ap_swap=>array('ap_swap','','start','forg.xpm','HORZ','swap default apache installation','apache_swap',''),
ap_install=>array('ap_install','','start','forg.xpm','HORZ','install apache as a windows service','apache_install',''),
ap_uninstall=>array('ap_uninstall','','start','forg.xpm','HORZ','uninstall the apache service','apache_uninstall','callback,vars,ok'),
ap_test=>array('ap_test','','start','forg.xpm','HORZ','test the apache configuration','apache_test','callback,vars,ok')
),
$my_frame=array(
name=>'my_frame',
title=>'mysql',
my_start=>array('my_start','','start','forg.xpm','HORZ','start mysql','mysql_start','callback,vars,ok'),
my_stop=>array('my_stop','','start','forg.xpm','HORZ','stop mysql','mysql_stop','callback,vars,ok'),
my_status=>array('my_status','','start','forg.xpm','HORZ','check MySQL ','my_status','1'),
my_install=>array('my_install','','start','forg.xpm','HORZ','install mysql as a \'service\'','my_install','callback,vars,ok')
),
$other_frame=array(
name=>'other_frame',
title=>'other',
analog_but=>array('analog_but','','start','forg.xpm','HORZ','run the php.ini configuration tool','run_exe',ANALOG_PATH),
configure_but=>array('configure_but','','start','forg.xpm','HORZ','tootip','my_echo','callback,vars,ok'),
gtkdev_but=>array('gtkdev_but','','start','forg.xpm','HORZ','gtkdev app browser','my_echo','callback,vars,ok')
),
$ute_frame=array(
name=>'ute_frame',
title=>'utilities',
ping_but=>array('ping_but','','start','forg.xpm','HORZ','ping a host','ping',''),
trace_but=>array('trace_but','','start','forg.xpm','HORZ','run a trace against an IP or hostname','tracert',''),
ip_but=>array('ip_but','','start','forg.xpm','HORZ','get your current IP (NT/XP only)','ip_config',''),
who_but=>array('who_but','','start','forg.xpm','HORZ','run a whois query','run_this_whois','')
)
);
?>
Comment