Fonction Scilab
eng - fr


put_xml_used_func - met à jour les fonctions utilisées dans un fichier xml

Librairie

Séquence d'appel

new_tt = put_xml_used_func(txt,filen)

Paramètres

Description

Add here a paragraph of the function description. Other paragraph can be added

Add here a paragraph of the function description

Exemple

Add here scilab instructions and comments

Contenu du fichier


//put_xml_used_func
//Fonction qui insère un vecteur chaîne de caractère
//dans un fichier entre les délimiteurs
//<USED_FUNCTIONS> et </USED_FUNCTIONS>
//Entrée : txt : matrice de chaînes de caractères de taille n,1
//         filen : nom du fichier xml (ex:filen=xml_path+'CAN_f.xml')
function new_tt=put_xml_used_func(txt,filen)
 if fileinfo(filen)<>[] then
  if size(txt,2)==1 then
    del1='<USED_FUNCTIONS>'
    del2='</USED_FUNCTIONS>'
    tt_sav=mgetl(filen);
    a=0;b=0;new_tt=tt_sav;
    //trouve la position des délimiteurs
    for i=1:size(tt_sav,1)
     if strindex(tt_sav(i),del1)<>[] then a=i, end;
     if strindex(tt_sav(i),del2)<>[] then b=i, end;
    end
    if a<>0&b<>0 then
      tt_used_func='  '+['<USED_FUNCTIONS>'
                         '  <SP>';'  '+txt(:,1);'  </SP>'
                         '</USED_FUNCTIONS>']

      //Ecrit la chaine de texte finale
      new_tt=[tt_sav(1:a-1);tt_used_func;tt_sav(b+1:size(tt_sav,1))]
    end
  else
   printf("Incompatible rsh variable\n");
  end
 else
  printf("File %s not found\n",filen);
  new_tt=[];
 end
endfunction 

Fonction(s) utilisée(s)

Add here the used function name and references

Auteurs

enter here the author name Add here the author references