ibec_msxml_GetError

Syntax

 function  ibec_msxml_GetError(xml, '');

Example

 EXECUTE IBEBLOCK
 as
 begin
 %blue%  -- Get file %%
   xmlfile = 'http://www.pwebapps.ezv.admin.ch/rates/estv/getavgxml'; %blue%-- wrong path%%
   --xmlfile = 'http://www.pwebapps.ezv.admin.ch/apps/rates/estv/getavgxml'; %blue%-- correct path%%
   xml = ibec_msxml_Create();
   try
     res = ibec_msxml_Load(xml, xmlfile);
     if (res) then
       nodes = ibec_msxml_SelectNodes(xml, 'monatsmittelkurs/devise');
     else
     begin
      %blue% -- Get error code (default behaviour without Return option)%%
       ErrCode = ibec_msxml_GetError(xml, '');
      %blue% -- Get error message%%
       ErrMessage = ibec_msxml_GetError(xml, 'Return=Message');
       ibec_ShowMessage(ErrCode || ' : ' || ErrMessage);
     end
   finally
     ibec_msxml_Free(xml);
   end;
 end

back to top of page
<< ibec_msxml_SelectSingleNode | IBEBlock | ibec_msxml_GetText >>