txt = return_xml_desc(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_desc //fonction qui retourne le texte placé entre //les deux premiers drapeaux <DESCRIPTION> //et </DESCRIPTION> trouvés dans le fichier fname //ex : txt=return_xml_desc(SCI+'/man/eng/nonlinear/intc.xml') //Entrée fname : chemin+nom du fichier xml //Sortie txt : tableau de chaines de caractères function txt=return_xml_desc(fname) txt_temp=mgetl(fname) txt=[] if txt_temp<>[] then for i=1:size(txt_temp,'*') if strindex(txt_temp(i),'<DESCRIPTION>')<>[] then a=i, end; if strindex(txt_temp(i),'</DESCRIPTION>')<>[] then b=i, end; end j=1 for i=a:b if strindex(txt_temp(i),'<DESCRIPTION>')<>[] then txt_temp(i)=strsubst(txt_temp(i),'<DESCRIPTION>',''); end if strindex(txt_temp(i),'</DESCRIPTION>')<>[] then txt_temp(i)=strsubst(txt_temp(i),'</DESCRIPTION>',''); end if strindex(txt_temp(i),'<P>')<>[] then txt_temp(i)=strsubst(txt_temp(i),'<P>',''); end if strindex(txt_temp(i),'</P>')<>[] then txt_temp(i)=strsubst(txt_temp(i),'</P>',''); end txt(j)=txt_temp(i); j=j+1; end end endfunction