Mercurial > hg > ltpda
diff m-toolbox/html_help/help/convertTOC.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/m-toolbox/html_help/help/convertTOC.m Wed Nov 23 19:22:13 2011 +0100 @@ -0,0 +1,40 @@ +function convertTOC() + +% This builds an html version of the TOC.XML file for use in on-line +% viewing. +% +% M Hewitson 24-07-07 +% +% $Id: convertTOC.m,v 1.1 2007/07/24 08:15:06 hewitson Exp $ +% + +disp('------------------') + +outfile = 'helptoc.html'; +xmlfile = 'helptoc.xml'; + +% Read in XML +xdoc = xmlread(xmlfile); + +ain = xdoc.getElementsByTagName('toc'); +a = ain.item(0); + +children = a.getChildNodes; + +% Write header +runcmd('cat header.html >', outfile); + +% Write content +fd = fopen(outfile, 'a+'); + +read_item(a, fd); + +fclose(fd) + + +% Write tail +runcmd('cat tail.html >>', outfile); + + +disp('------------------') +