return_xml_call_seq - return calling sequence of a xml file
txt = return_xml_call_seq(fname)
- fname : string. source XML file (path+name)
- txt : vector of strings. the text of the calling sequence paragraph
//return_xml_call_seq
//fonction qui retourne le texte placé entre
//les deux premiers drapeaux <CALLING_SEQUENCE>
//et </CALLING_SEQUENCE> trouvés dans le fichier fname
//compatilble avec help_skeleton
//ex : txt=return_xml_call_seq(SCI+'/man/eng/nonlinear/intc.xml')
//Entrée fname : chemin+nom du fichier xml
function txt=return_xml_call_seq(fname)
txt_temp=mgetl(fname)
txt=[]
j=1;
a=[];
if txt_temp<>[] then
for i=1:size(txt_temp,'*')
if strindex(txt_temp(i),'<CALLING_SEQUENCE_ITEM>')<>[] then
a(j,1)=i;
end;
if strindex(txt_temp(i),'</CALLING_SEQUENCE_ITEM>')<>[] then
a(j,2)=i;
j=j+1;
end
end
if a<>[] then
for i=1:size(a,'r')
txt(i)="";
//pour chaque bloc
for j=a(i,1):a(i,2)
txt(i)=txt(i)+txt_temp(j)
end
end
txt=strsubst(txt,'<CALLING_SEQUENCE_ITEM>',"");
txt=strsubst(txt,'</CALLING_SEQUENCE_ITEM>',"");
txt=retrieve_char(txt);
txt=stripblanks_begin(txt);
txt=stripblanks_end(txt);
if txt=="" then txt=[], end;
end
else
txt=[];
end
endfunction
IRCOM Group
Alan Layec