txt = return_xml_authors(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_authors //fonction qui retourne le texte placé entre //les deux premiers drapeaux <AUTHOR_ITEM> //et </AUTHOR_ITEM> trouvés dans le fichier fname //ex : txt=return_xml_authors(MODNUM+'/man/xml/CAN_f.xml') //Entrée fname : chemin+nom du fichier xml //Sortie txt : tableau de chaines de caractères function txt=return_xml_authors(fname) txt_temp=mgetl(fname); txt=[] a=[] j=1; if txt_temp<>[] then for i=1:size(txt_temp,'*') if strindex(txt_temp(i),'<AUTHOR_ITEM>')<>[] then a(j,1)=i; end if strindex(txt_temp(i),'</AUTHOR_ITEM>')<>[] then a(j,2)=i; j=j+1; end end for i=1:size(a,'r') for j=a(i,1):a(i,2) txt(i)=txt(i)+txt_temp(j) end txt(i)=strsubst(txt(i),('<AUTHOR_ITEM>'),'') txt(i)=strsubst(txt(i),('</AUTHOR_ITEM>'),'') while part(txt(i),1)==' ' txt(i)=part(txt(i),2:length(txt(i))); end end end endfunction