return_xml_desc - return long description of a xml file (obsolete)
txt = return_xml_desc(fname)
- fname : string. source XML file (path+name)
- txt : vector of strings. the text of the description paragraph.
//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
IRCOM Group
Alan Layec