txt = return_xml_used_func(fname)
Add here a paragraph of the function description. Other paragraph can be added
Add here a paragraph of the function description
Add here scilab instructions and comments
//return_xml_used_func //fonction qui retourne le texte placé entre //les deux premiers drapeaux <USED_FUNCTIONS> //et </USED_FUNCTIONS> trouvés dans le fichier fname //compatilble avec help_skeleton //ex : txt=return_xml_used_func(SCI+'/man/eng/nonlinear/intc.xml') //Entrée fname : chemin+nom du fichier xml function txt=return_xml_used_func(fname) txt_temp=mgetl(fname) txt=[] a=[] b=[] if txt_temp<>[] then for i=1:size(txt_temp,'*') if strindex(txt_temp(i),'<USED_FUNCTIONS>')<>[] then a=i, end; if strindex(txt_temp(i),'</USED_FUNCTIONS>')<>[] then b=i, end; end if a<>[] & b<>[] then txt=txt_temp(a:b) txt=strsubst(txt,'<USED_FUNCTIONS>',"") txt=strsubst(txt,'</USED_FUNCTIONS>',"") txt=strsubst(txt,'<SP>',"") txt=strsubst(txt,'</SP>',"") //Enlève les blancs du début txt=stripblanks_begin(txt); //Nettoie les lignes vides tt=[] k=1; emptyf=%t; //Empty flag for i=1:size(txt,1) if length(txt(i))<>0 then tt(k)=txt(i); k=k+1; emptyf=%f; end end if emptyf then txt="" else txt=tt; end end else txt=[] end endfunction